Search found 74 matches

by shakil
Sat Jul 16, 2011 7:38 am
Forum: Volume 9 (900-999)
Topic: 990 - Diving for Gold
Replies: 11
Views: 5294

990 - Diving for Gold

Why WA!!! Please give me, some input & output. #include<stdio.h> long A[1009],B[1009],C[1009]; long d[40],v[40],x[40],y[40]; long t,w,n,i,j,max,count,k,flag; int main() { while(scanf("%ld %ld",&t,&w)==2) { scanf("%ld",&n); for(i=0;i<n;i++) { scanf("%ld %ld",&d[i],&v[i]); x[i] = w * d[i] * 3; y[i]=0;...
by shakil
Sat Jun 11, 2011 8:40 pm
Forum: Volume 119 (11900-11999)
Topic: 11953 - Battleships
Replies: 23
Views: 5925

Re: 11953 - Battleships

I also got WA. But why??? #include<stdio.h> long B[109][109],n,cas,cas1,count,i,j; char A[109][109]; void make(long x,long y,long z,long z1) { B[x][y]=1; if(z+1<=n/2) { if((z1==0 ||z1==1)&&x-1>=0&&('x'==A[x-1][y]||'@'==A[x-1][y])&&B[x-1][y]==0) make(x-1,y,z+1,1); else if((z1==0 ||z1==1)&&x+1<n&&('x'...
by shakil
Fri Mar 12, 2010 5:59 pm
Forum: Volume 104 (10400-10499)
Topic: 10483 - The Sum Equals the Product
Replies: 21
Views: 10758

Re: 10483 - The Sum Equals the Product

Why WA!!! Please, some one check my outputs & say what is the problem in my triples. Thanks #include<stdio.h> #include<math.h> long P[1009],A[1009]; long sam1[1009],sam2[1009],sam3[1009],n,sam; void make(long h1,long h2,long h3) { long long x1,x2,x3,x4,i,v1,v2; x1 = h3 - h1; x2 = (h3 * 10000)/h1; x3...
by shakil
Fri Mar 05, 2010 3:51 pm
Forum: Volume 9 (900-999)
Topic: 947 - Master Mind Helper
Replies: 3
Views: 4058

Re: 947 - Master Mind Helper

I think this problem is similar of 296. But i do not understood the output of: 567 0 1 & 91543 0 5.
How the output will be 234 & 44.
My program gave output 216 & 1024.
Please, any one discuss how output is 44 for 91543 0 5 ?
by shakil
Thu Feb 25, 2010 7:08 pm
Forum: Volume 2 (200-299)
Topic: 270 - Lining Up
Replies: 48
Views: 15708

Re: 270: What's the limit for n???

Why WA!!! Please help, give me some test case which my code fail. I Think my code is ok :( #include<stdio.h> #include<string.h> long x[709],y[709],cas,cas1,n,N,max; long long X[709],Y[709],C[709],left[709],right[709]; long long t1,t2,p1,p2,i,j,root; char temp[109]; int main() { gets(temp); sscanf(te...
by shakil
Sat Feb 13, 2010 7:43 pm
Forum: Volume 117 (11700-11799)
Topic: 11732 - strcmp() Anyone?
Replies: 5
Views: 3062

11732 - strcmp() Anyone?

Why WA!!! Please give me some sample input & output to make my code AC. Thanks. #include<stdio.h> #include<string.h> unsigned long long count,tc1; long n,i,j,next,l,st,k,p,cas1,pp1; long value[4000009],index1[4000009],brother[4000009]; char temp[1009]; char Ch[4000009]; int main() { while(1) { scanf...
by shakil
Fri Feb 12, 2010 6:54 pm
Forum: Volume 107 (10700-10799)
Topic: 10722 - Super Lucky Numbers
Replies: 25
Views: 9275

Re: 10722 - Super Lucky Numbers

Why WA!!!!!!!! I have checked all the input & output of the board but still WA. Please give me some sample input & output to make my solution AC. Thanks #include<stdio.h> #include<string.h> char result[509],output[509]; char A[109][3][509]; void mul(char h1[509], long h2) { long l,i,hate; l = strlen...
by shakil
Tue Feb 09, 2010 5:40 pm
Forum: Volume 104 (10400-10499)
Topic: 10482 - The Candyman Can
Replies: 10
Views: 5711

Re: 10482 - The Candyman Can

Why WA!!! I used BFS. Please give me some input & output which my code can not cover. Thanks

Code: Select all

CUT after AC. Thanks crip121 for his input & output. I have changed my BFS solution to DP & it really nice  :D 
by shakil
Sat Feb 06, 2010 7:34 pm
Forum: Volume 117 (11700-11799)
Topic: 11709 - Trust groups
Replies: 9
Views: 4118

Re: 11709 Trust Groups

Why WA!!! Please give me some test case. Thanks.

Code: Select all

CUT
by shakil
Sun Jan 31, 2010 6:06 pm
Forum: Volume 117 (11700-11799)
Topic: 11747 - Heavy Cycle Edges
Replies: 11
Views: 3825

Re: 11747 - Heavy Cycle Edges

To MRH Your input is wrong according to the statement -> "no two nodes are directly connected by more than one edge." I know about MST but i want to solve this problem in different way & my solution was not MST. If no two nodes are directly connected by more than one edge then my solution is ok, i t...
by shakil
Sat Jan 30, 2010 8:30 pm
Forum: Volume 117 (11700-11799)
Topic: 11747 - Heavy Cycle Edges
Replies: 11
Views: 3825

11747 - Heavy Cycle Edges

I got WA. But i think my solution is ok. So, please give me some critical sample input & output.

Code: Select all

CUT
by shakil
Thu Jan 14, 2010 6:21 pm
Forum: Volume 115 (11500-11599)
Topic: 11550 - Demanding Dilemma
Replies: 12
Views: 5174

Re: 11550 - Demanding Dilemma

To : zhouerjin
Change only one line & i hope that will make you AC.

Code: Select all

if (u*v<0) return false;
change to ->

Code: Select all

if (u==-1||v==-1) return false;
Because if u & v two are -1 then u*v>0
by shakil
Sun Jan 10, 2010 5:28 pm
Forum: Volume 4 (400-499)
Topic: 416 - LED Test
Replies: 34
Views: 9588

Re: Please Help T.T 416 - LED TEST

Why i WA? I test all the inputs in the board. But WA. Please, someone give me some test case that fail my code. Thanks. #include<stdio.h> #include<string.h> char s[13][13],sam[13][13]; long n,yes,sa[19]; void make(long x,long y,long z) { if(x==n) yes = 1; else { long flag,i,j,i1; flag=1; for(i=0;i<7...
by shakil
Fri Sep 19, 2008 9:11 pm
Forum: Volume 114 (11400-11499)
Topic: 11415 - Count the Factorials
Replies: 11
Views: 4931

Re: 11415 - Count the Factorials

Why WA???

Code: Select all

Cut after AC
by shakil
Fri Sep 19, 2008 8:59 pm
Forum: Volume 114 (11400-11499)
Topic: 11408 - Count DePrimes
Replies: 12
Views: 5582

Re: 11408 - Count DePrimes

Why WA???

Code: Select all

Cut after AC

Go to advanced search