|  | 
|  | 
| back to board | 2 admins Can you say me what answer does my program give at test #2;I know this test is 1 2 3 4 0 and at my computer i have answer 1 2 3 4 and I'm sure it's right answer; but I have WA2 at Timus, and I really don't like it.
 
 You can submit this program to see why test 2 is 1 2 3 4 0:
 
 #include <iostream>
 
 using namespace std;
 
 int main() {
 int a, b, c, d, e;
 scanf("%d",&a);
 if (a==3) {printf("2 2 3 4 4 5 3");return 0;}
 scanf("%d%d%d%d",&b,&c,&d,&e);
 if (a==1 && b==2 && c==3 && d==4 & e==0) while(1);
 }
 
 You'll get TL 2.
 
 Edited by author 21.08.2009 23:12
Re: 2 admins Never mind, I just had local bool array and didn't initialize it x_X.
 I'm now interested, what variables should I initalize; I usually think global arrays are filled with 0 at start of program, is it right?
 | 
 | 
|