Search found 11 matches

by sudipta
Sun Jun 13, 2010 9:37 am
Forum: Volume 112 (11200-11299)
Topic: 11279 - Keyboard Comparison
Replies: 1
Views: 1781

11279 - Keyboard Comparison

Getting W.A. Whats the problem? #include<string.h> #include<stdio.h> int main() { char key[]={'`','1','2','3','4','5','6','7','8','9','0','-','=','\\','Q','W','E','R','T','Y','U','I','O','P','[',']','A','S','D','F','G','H','J','K','L',';','\'','Z','X','C','V','B','N','M',',','.','/','~','!','@','#',...
by sudipta
Sun May 30, 2010 8:11 am
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25667

Re: 119 Why WA??

Thank you very much. I got it accepted.
by sudipta
Sat May 29, 2010 9:56 pm
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25667

Re: 119 Why WA??

How can I stop this? I am weak in these case.
by sudipta
Sat May 29, 2010 7:08 pm
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25667

Re: 119 Why WA??

My code is giving all the output correctly. But I am getting WA. Please help anyone..

Code: Select all

Deleted After Accepted
by sudipta
Thu Nov 05, 2009 6:46 pm
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 61322

10200 Prime Time

What is wrong? #include<stdio.h> #include<math.h> #define len 10000000 char prime[len+1]; void sieve() { int i,j,k=0,r; prime[0]=prime[1]=0; prime[2]=1; for(i=3;i<=len;i+=2) { prime[i]=1; prime[i+1]=0; } r=(int)sqrt(len); for(i=3;i<=r;i++) { if(prime[i]==1) { for(j=i*i;j<=len;j+=i*2) { prime[j]=0; }...
by sudipta
Sat Oct 24, 2009 10:21 pm
Forum: Volume 109 (10900-10999)
Topic: 10945 - Mother bear
Replies: 65
Views: 16846

10945- MOther Bear

Please anyone help me. :x Here is my code. I got WA again and again. #include<stdio.h> #include<string.h> #include<ctype.h> int main() { char line[100]; int len,i,j,l,k; while(gets(line)) { len=strlen(line); if((len==4)&&(line[0]=='D'&&line[1]=='O'&&line[2]=='N'&&line[3]=='E'))break; char test[100],...
by sudipta
Sat Oct 10, 2009 8:56 pm
Forum: Volume 109 (10900-10999)
Topic: 10945 - Mother bear
Replies: 65
Views: 16846

Re: 10945 - Mother Bear

Help Please. 10945-Mother Bear #include<stdio.h> #include<string.h> #include<ctype.h> int main() { char line[100]; int len,i,j,l,k; while(gets(line)) { if(line[0]=='D'&&line[1]=='O'&&line[2]=='N'&&line[3]=='E')break; char test[100],x,rev[100]; j=0; int p=0; len=strlen(line); if(len==0)printf("You w...
by sudipta
Sun Oct 04, 2009 11:55 am
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 33355

Re: I need Help on 530(Binomial Showdown)

Thank you very much.
I got it.
by sudipta
Sat Oct 03, 2009 9:30 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67114

10189-Minesweeper (WHY WA)

I wrote this code. output cases were correct . but WA. :x #include<stdio.h> int main() { int i,j,x,y,m,field=1; char mine[110][110]; while(scanf("%d%d",&x,&y)==2) { if(x==0&&y==0)break; for(i=0;i<x;i++) { for(j=0;j<y;j++) { scanf("%1s",&mine [j]); } } if(field>1) printf("\n"); printf("Field #%d:\n",...
by sudipta
Thu Oct 01, 2009 8:35 am
Forum: Volume 5 (500-599)
Topic: 530 - Binomial Showdown
Replies: 137
Views: 33355

I need Help on 530(Binomial Showdown)

I submitted this code. But got WA. Con u help me? #include<stdio.h> long double fact(long double n) { if (n==0) return 1; else return (n*fact(n-1)); } int main() { long double n,k,r,f,g,temp; while(scanf("%Lf%Lf",&n,&k)==2) { long double u=1,l1=1,l2=1; if(n==0 && k==0) break; f=fact(n); r=fact(k)*f...
by sudipta
Wed Sep 30, 2009 7:34 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 31255

10235 - SIMPLY EMIRP (help)

I gave this solution for prob-10235. But it made WRONG ANSWER. Where is the fault? #include<stdio.h> long int prime(long int n){ int i,a=0; for(i=2;i<=n/2;i++){ if(n%i==0) { a++; break; } } if(a>0) return 0; else return 1; } long int reverse(long int n) { long int x,rev=0; while(n>0) { x=n%10; rev=...

Go to advanced search