Search found 3 matches

by sabquat
Fri Aug 19, 2011 11:41 am
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 72720

10189-Minesweeper :WA

plz,someone shoot my trouble :-? #include<stdio.h> #include<stdlib.h> int main() { int l,c,p,b,q,i=0,f=1; char **n; while(scanf("%d %d",&l,&c)==2&&l!=0&&c!=0) { n=(char**)malloc(l*sizeof(char*)); for(b=0;b<l;b++) n[b]=(char*)malloc((c+1)*sizeof(char)); for(p=0;p<l;p++) scanf("%s",n[p]); printf("Fiel...
by sabquat
Fri Aug 19, 2011 11:35 am
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 45134

101-The Blocks Problem: Runtime error!!!

Help me!!! where is the problem???? :( #include<stdio.h> #include<stdlib.h> int main() { char cd1[5],cd2[5]; int **p,n,i,a,b,j,xa,xb,ya,yb; while(scanf("%d",&n)!=EOF&&n!=0) { p=(int**)malloc(n*sizeof(int*)); for(i=0;i<n;i++) p[i]=(int*)malloc(n*sizeof(int)); for(i=0;i<n;i++) { p[i][0]=i; for(j=1;j<n...
by sabquat
Fri Aug 19, 2011 11:30 am
Forum: Volume 4 (400-499)
Topic: 424 - Integer Inquiry
Replies: 96
Views: 21087

424 - Integer Inquiry: WA!!!!

plz help me.... :oops: here is my code- #include<stdio.h> int main() { char inp[101],out[110]; int i,j,c,tempc; for(i=0;i<110;i++) out[i]='0'; while(scanf("%s",inp)==1) { for(i=0;inp[i]!='\0';i++); for(c=0,j=109,i--;i>=0;i--,j--) { tempc=c; c=(c+out[j]+inp[i]-96)/10; out[j]=(tempc+out[j]+inp[i]-96)%...

Go to advanced search