In problem http://codeforces.net/contest/296/problem/C I try to create a test for hacking, but I get error "Invalid input". I don't know why my code get this error. Please help me, here's my code:
int main() {
cout << "100000 100000 100000\n";
for (int i = 0; i < 100000; i++) {
if (i)
cout << " ";
cout << "100000";
}
cout << "\n";
for (int i = 0; i < 100000; i++) {
if (i)
cout << "\n";
cout << "1 100000 100000";
}
cout << "\n";
for (int i = 0; i < 100000; i++) {
if (i)
cout << "\n";
cout << "1 100000";
}
cout << "\n";
}
It's because you have a " " at end of your 2nd line & you have some additional Enters at end of your 2nd and 3nd for! I guess this code is working correctly:
& it's my code for this hacking :
Sorry for my terrible English!
thanks you so much! :D
Second account? Nooooo
Yes! I create two account for participating virtual contest twice :D
Original generator doesn't output anything unwanted. So it is not a reason of "Invalid input", but I don't know what is wrong.
With your changes there is no space before last number in 2nd line. (
"... 100000 100000 100000100000"
)Also at the end of file will be:
Yes, you are right! Thank you!
Oh! I see, thank you so much, I still can't find what wrong with my test :D
Can you please get validator comment? It's text in box, which opens if click "Invalid test" link on your hack.
FAIL Input can't contain two or more consecutive spaces, but line 2 (1-based) contains [validator wfval.exe returns exit code 3]
May be you send your genertor as test, not as test genertor?
This's my test: http://www.mediafire.com/?wdj9rkody0303dv Thanks for your help :D