I can't figure out a way to unblock 1713D - Tournament Countdown. I used some wrappers over Console
for easier testing, but even with pure Console
usage it gets stuck on test 3: 167411234.
I do:
Console.WriteLine("? 1 2");
Console.Out.Flush();
And perform all reads by Console.ReadLine()
only.
What can be the reason for this?
From statement:
After printing a query or the answer do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded.
From
AskCompare
:Correct :)
From
Solve
:Incorrect :(
Yes, I fixed that, but it didn't help.
1) Maybe you just have incorrect solution? Try check whether you read
-1
(as described in statement)2) I'd try to generate minumum example with straight
Console.WriteLine()
/Console.ReadLine()
instead any strange helpers (In particular,sizeof(char) != sizeof(byte)
in C#, so I don't sure that printing cast '\n' to byte or reading byte from string is correct in C#)