sivakd's blog

By sivakd, history, 12 months ago, In English

The output for https://codeforces.com/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.com/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?
»
12 months ago, # |
  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?

  • »
    »
    12 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    The final output is just the cell of the king which is just r and c coordinates, just two integers. But the output format in the test cases shows 3 values. What is the 3rd value?

»
12 months ago, # |
  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.
  • »
    »
    12 months ago, # ^ |
      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.

    • »
      »
      »
      12 months ago, # ^ |
        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.

      • »
        »
        »
        »
        12 months ago, # ^ |
          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.

        • »
          »
          »
          »
          »
          12 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          So what's the problem? You should have tested correctly.