Search found 2 matches

by farhan
Sun Dec 16, 2007 1:50 pm
Forum: Volume 101 (10100-10199)
Topic: 10192 - Vacation
Replies: 58
Views: 15353

10192 - CE

Can anyone tell why CE in this prog? #include<stdio.h> #include<string.h> char str1[100], str2[100]; int test_case = 1; int m, n; int i, j; int c[110][110]; void LCScount() { m = strlen(str1); n = strlen(str2); for(i=0; i<=m; ++i) c[i][0] = 0; for(i=0; i<=n; ++i) c[0][i] = 0; for(i=1; i<=m; ++i) { f...
by farhan
Sun Dec 16, 2007 1:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13608

10066 - CE

Can anyone tell why is CE in this prog? #include<stdio.h> int c[110][110]; int test_case = 1; int m, n; int i, j; void LCScount(int x[], int y[]) { for(i=0; i<=m; i++) c [0] = 0; for(j=0; j<=n; j++) c[0][j] = 0; for(i=1; i<=m ; i++) for(j=1; j<=n; j++) { if(x[i-1] == y[j-1]) c [j] = c[i-1][j-1] + 1;...

Go to advanced search