|
|
вернуться в форумWhy RE(AV) Test #6 #include <cstdio> char a[300010], k; int main(){ char c; while((c = getchar()) != EOF){ if(k == 0 || a[k - 1] != c) a[k++] = c; else k--; } for(int i = 0; i < k; i++) putchar(a[i]); return 0; } This one gives RE(AV) on the 6th test. I tried it 4 times with different sizes of array "a" (200000, 200010, 300010, 2000000) and each time got this error. I found it very strange, could you help me please? Re: Why RE(AV) Test #6 simple, int k(0); |
|
|