Search found 13 matches

by Xenon Kfr
Wed Jan 28, 2015 1:15 am
Forum: Volume 115 (11500-11599)
Topic: 11530 - SMS Typing
Replies: 41
Views: 8604

Re: 11530 - SMS Typing

why WA ?i dont understand #include<bits/stdc++.h> using namespace std; int main() { int t; string array1="adgjmptw ",array2="behknqux",array3="cfilorvy"; string s; cin>>t; int c=1; for(int i=0; i<t; i++) { scanf(" "); getline(cin,s); int sum=0; for(int j=0; s[j]; j++) { for(int k=0; k<9; k++) if(s[j...
by Xenon Kfr
Tue Jan 27, 2015 11:44 pm
Forum: Volume 103 (10300-10399)
Topic: 10340 - All in All
Replies: 129
Views: 31834

Re: 10340 - All in All

why WA ? #include<bits/stdc++.h> using namespace std; int main() { string s,t; while(cin>>s>>t) { if(cin.eof()) return 0; int temp=0,yes=1,j; if(s.size()>t.size()) { yes=0; } else if(s.size()==t.size()) { if(s==t) yes=1; else yes=0; } else for(int i=0; s[i]; i++) { for(j=temp; t[j]; j++) { if(s[i]==...
by Xenon Kfr
Tue Dec 30, 2014 3:04 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67137

Re: 10189 - Minesweeper

Why Runtime error?? #include<bits/stdc++.h> using namespace std; int main() { int m=5,n=5,i,j; int Z=0; while(cin>>m>>n && m!=0 &&n!=0) { char a[m][n]; vector<int> star; for(i=0; i<m; i++) { for(j=0; j<n; j++) { cin>>a[i][j]; if(a[i][j]=='*') { star.push_back(i*10+j); } a[i][j]=0; } } for(i=0; i<m; ...
by Xenon Kfr
Sat Nov 22, 2014 11:39 pm
Forum: Volume 4 (400-499)
Topic: 488 - Triangle Wave
Replies: 270
Views: 30727

Re: 488 - Triangle Wave

WA .why ? #include<stdio.h> int main() { long long t,a,f,i,j,k,temp,ii; while((scanf("%lld",&t))!=EOF) { printf("\n"); for(ii=0;ii<t;ii++) { scanf("%lld",&temp); scanf("%lld",&f); for(i=0;i<f;i++) { a=temp; for(j=1;j<=a;j++) { for(k=1;k<=j;k++) printf("%d",j); printf("\n"); } if(a/2==1) a=a-1; for(j...
by Xenon Kfr
Sat Nov 22, 2014 6:31 pm
Forum: Volume 104 (10400-10499)
Topic: 10424 - Love Calculator
Replies: 137
Views: 39207

Re: 10424 - Love Calculator

thanx a lot
by Xenon Kfr
Sat Nov 22, 2014 12:01 am
Forum: Volume 104 (10400-10499)
Topic: 10424 - Love Calculator
Replies: 137
Views: 39207

Re: 10424 - Love Calculator

its WA .why? #include<stdio.h> int digit(int); int main() { int na,nb,sum1,sum,i,j,value; float r; char a[25],b[25]; while(gets(a)) { gets(b); sum=0; for(i=0;a[i];i++) { if(a[i]>64 && a[i]<91) { value=a[i]-64; } else if(a[i]>96 && a[i]<123) { value=a[i]-96; } sum=sum+value; } na=digit(sum); sum1=0; ...
by Xenon Kfr
Fri Nov 21, 2014 6:37 pm
Forum: Volume 104 (10400-10499)
Topic: 10424 - Love Calculator
Replies: 137
Views: 39207

Re: 10424 - Love Calculator

i did check it again.its CE.and why its wrong?
by Xenon Kfr
Fri Nov 21, 2014 4:10 pm
Forum: Volume 104 (10400-10499)
Topic: 10424 - Love Calculator
Replies: 137
Views: 39207

Re: 10424 - Love Calculator

why compilation error? #include<stdio.h> int digit(int); int main() { int na,nb,sum1,sum,i,j,value; float r; char a[25],b[25]; while(gets(a)) { gets(b); sum=0; for(i=0;a[i];i++) { if(a[i]>64 && a[i]<91) { value=a[i]-64; } else if(a[i]>96 && a[i]<123) { value=a[i]-96; } sum=sum+value; } na=digit(sum...
by Xenon Kfr
Fri Nov 21, 2014 12:49 am
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21909

Re: 494 - Kindergarten Counting Game

thanx a lot
by Xenon Kfr
Wed Nov 19, 2014 8:48 pm
Forum: Volume 4 (400-499)
Topic: 494 - Kindergarten Counting Game
Replies: 119
Views: 21909

Re: 494 - Kindergarten Counting Game

why i get time limit in this code ? #include<stdio.h> int main() { char c[1000]; int count,nc,i; count=0;nc=1; while((gets(c))!=EOF) { for(i=0;c[i];i++) { if( ( (c[i]>64 && c[i]<91) || (c[i]>96 && c[i]<123) ) ) { if(nc==1) { count++; nc=0; } } else nc=1; } printf("%d\n",count); count=0;nc=1; } retu...
by Xenon Kfr
Wed Nov 19, 2014 1:44 am
Forum: Volume 118 (11800-11899)
Topic: 11805 - Bafana Bafana
Replies: 23
Views: 7272

Re: 11805 - Bafana Bafana

thanx man
by Xenon Kfr
Wed Nov 19, 2014 1:42 am
Forum: Volume 114 (11400-11499)
Topic: 11498 - Division of Nlogonia
Replies: 4
Views: 1760

Re: 11498 - Division of Nlogonia

what is wrong ? why wa ? #include<stdio.h> int main() { long long t,m,n,i,a,b; while((scanf("%lld",&t))) { if(t==0) break; scanf("%lld%lld",&m,&n); for(i=0;i<t;i++) { scanf("%lld%lld",&a,&b); if(a==m || b==n) printf("divisa\n"); else if(a>m && b>n) printf("NE\n"); else if(a<m && b<n) printf("SO\n")...
by Xenon Kfr
Tue Nov 18, 2014 1:37 am
Forum: Volume 118 (11800-11899)
Topic: 11805 - Bafana Bafana
Replies: 23
Views: 7272

Re: 11805 - Bafana Bafana

i dont know why my code is wrong ?

Code: Select all

Removed after getting accepted

Go to advanced search