Search found 2 matches

by slavej
Sat Nov 22, 2003 10:15 am
Forum: Volume 100 (10000-10099)
Topic: 10066 - The Twin Towers
Replies: 35
Views: 13233

10066 ?????? Why WA.

I'm using LCS here but it doesn't work. WHY?? [c]#include <stdio.h> int main(void) { int common[101][101]; int a[101],b[101]; int i,j,m,n, counter = 0; scanf("%d%d",&n,&m); while((n > 0) || (m > 0)) { ++counter; for (i = 0; i <= 100; ++i) for (j = 0; j <= 100; ++j) common [j] = 0; for (i = 1; i <= n...
by slavej
Sat Nov 22, 2003 1:09 am
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 58104

10035 Primary arithmetic

What is qrong with this code::: [c]#include <stdio.h> int main(void) { int i, n1, n2, temp, length; int a1[20], a2[20]; while (1) { scanf("%d%d",&n1,&n2); if ( (n1 == 0) && (n2 == 0) ) break; for (i = 0; i <= 15; ++i) { a1 = 0; a2 = 0; } i = 0; temp = n1; /* Put the digits of n1 into an array */ whi...

Go to advanced search