Search found 5 matches

by snape
Fri Jan 06, 2012 1:11 pm
Forum: Volume 111 (11100-11199)
Topic: 11121 - Base -2
Replies: 23
Views: 14535

11121-Base -2

11121,plz help. after hard work i code this,bt get TLE && thn RE if anyone can tell me if i will need to change my logic,thn i will. if any one can tell me in this logic how i recover this RE & TLE. my code is here: #include <stdio.h> #include <math.h> #define N 2000000 #include <string.h> #include<...
by snape
Mon Dec 26, 2011 3:51 pm
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27679

uva problem no:10530

getting WA. plz help :( #include <stdio.h> #include <string.h> long int right,high=8888,low=0,i=0,pre_high,pre_low,h=0; char status[20],hg[1000],lw[1000]; int main() { int guess_num; while(1) { if(guess_num==0) break; scanf("%d",&guess_num); getchar(); gets(status); if(strcmp(status,"too high")==0) ...
by snape
Mon Dec 19, 2011 5:23 pm
Forum: Volume 119 (11900-11999)
Topic: 11946 - Code Number
Replies: 49
Views: 8889

11946- Code Number

i got WA && also dont under stand input system,plz help my code is here: #include<stdio.h> char a[100]; int c,i,j,found,got,t,test,line,w=0; int main() { scanf("%d",&test); getchar(); while(test--) { while(gets(a) && (a[0]!='\n')) { if(c==0) break; for(i=0;a !='\0';i++) { if(a =='1') a ='I'; else if...
by snape
Sun Dec 04, 2011 12:59 pm
Forum: Volume 100 (10000-10099)
Topic: 10015 - Joseph's Cousin
Replies: 23
Views: 4966

uva problem no 10015

plz help me about this problem,i have posted my code earlier but no help from any1..
:(
by snape
Sat Dec 03, 2011 5:06 pm
Forum: Volume 100 (10000-10099)
Topic: 10015 - Joseph's Cousin
Replies: 23
Views: 4966

uva problem no:10015

uva problem no:10015 still got WA,but dont know why? here is my code: #include<stdio.h> #include<math.h> #define max 3520 int p[max],ab[max],v[max],s,f,g,h,m,x,w,mm; void sieve() { long i,j,c=0,x=0,b=0; for(i=2;i<max;i++) p =1; for(i=2;i<=sqrt(max); ) { for(j=i+i;j<=max;j+=i) p[j]=0; i++; for(;!p ;i...

Go to advanced search