Search found 5 matches
- Tue May 09, 2006 12:42 am
- Forum: Volume 5 (500-599)
- Topic: 524 - Prime Ring Problem
- Replies: 74
- Views: 30824
i dont get TLE
I dont get TLE.
It is WA....
- Mon May 08, 2006 7:49 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10611 - The Playboy Chimp
- Replies: 44
- Views: 25527
10611 how WA......
i don't know why judge give me WA
plz any one help me....
#include<stdio.h>
long cham[50001];
int BinSearch(long x,long n)
{
long low=0,high=n-1,mid,max=0,min=0;
while(low<=high)
{
mid=(low+high)/2;
if(x<cham[mid])max=cham[mid],high=mid-1;
else if(x>cham[mid])min=cham[mid],low=mid+1 ...
- Sat May 06, 2006 2:37 am
- Forum: Volume 101 (10100-10199)
- Topic: 10168 - Summation of Four Primes
- Replies: 51
- Views: 29895
10168
What is the problem of my code?
any one help me please?
#include<stdio.h>
#include<math.h>
bool flag[10000001];
long int x,y,n;
void sieve(long int L,long int U)
{
long int i,j,d;
d=U-L+1;
for (i=0;i<d;i++) flag[i]=true;
for (i=(L%2!=0);i<d;i+=2) flag[i]=false;
for (i=3;i ...
- Sat May 06, 2006 2:27 am
- Forum: Volume 100 (10000-10099)
- Topic: 10042 - Smith Numbers
- Replies: 75
- Views: 33545
10042
I dont know why judge give me wrong answer
My code is given below...
What is the problem of it...
#include<stdio.h>
#include<math.h>
long long int DigSum(long long int t)
{
long long int m=0;
while(t)
{
m+=t%10;
t/=10;
}
return m;
}
long long int PrimeFactorSum(long long int t ...
- Sat May 06, 2006 1:56 am
- Forum: Volume 5 (500-599)
- Topic: 524 - Prime Ring Problem
- Replies: 74
- Views: 30824
524
I dont know what is the wrong with my code..
My code generates
case 2: 1 output
case 4: 2 outputs
case 6: 2 outputs
case 8: 4 outputs
case 10: 96 outputs
case 12: 1024 outputs
case 14: 2880 outputs
case 16: 81024 outputs
please help me out of here...
#include<stdio.h>
#include<string.h ...