sivakd's blog

By sivakd, history, 4 years ago, In English

The output for https://codeforces.me/contest/1797/problem/C is supposed to be two integers. But in the test cases output, it shows 3 values.

Another interactive problem I attempted recently, https://codeforces.me/contest/1807/problem/E , expects a single value and the test cases show a single value.

So why there are 3 values for 1797/C ? It confused me during the contest making me think I was doing something wrong.

  • Vote: I like it
  • -17
  • Vote: I do not like it

| Write comment?
»
4 years ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

Three questions were asked and three answers were given, what's wrong about that?

»
4 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
  1. In interactive problem you do no need to care about the input and output. It is generated by the interactor to determine the verdict.
  2. In this problem, the third number is the number of queries asked.
  • »
    »
    4 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    But the output format for 1807/E doesn't have the number of queries at the end in the test cases output.

    • »
      »
      »
      4 years ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      It may have or may not have, because in interactive problem you do not need to care about the input and output. It is generated by the interactor to determine the verdict.

      • »
        »
        »
        »
        4 years ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        My submission failed for the pretest as the logic was incorrect but the three value output caused me confusion. That too, the first answer was "2 2" and locally that's what I got (due to incorrect testing) but the output in the test case was "1 2 2". I was wondering where the 1 came from rather than realizing the system was recognizing it as "1 2" due to the flaw with my logic during the context.