Mir_123's blog

By Mir_123, history, 3 months ago, In English,

Can anyone tell me a test case for this problem:- 282B - Painting Eggs that gives "-1" as the output

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Mir_123 (previous revision, new revision, compare).

»
3 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

There is none.

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

3 100 900 100 900 100 900

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

    In this example, you can give A all three eggs and $$$|300-0| \le 500$$$, as desired.

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

      Oh my bad. Sure thanks

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

        At last, the question still remains the same, if there is no such test case possible then why the hell did codeforces include such a possibility in the question anyway, not even one test case gives the output as "-1"

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

          They probably didn't want to give any hint away about the solution.

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

            yeah that's a possible case but we still don't have any mathematical proof to whether this situation is possible or not ..... so i am still waiting for someone to give me one

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

              Most competitions have a tutorial, which includes both a solution and a proof of correctness. It should answer your question.

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

                There is no mention about such a situation ...... though they have given a proof for other test cases....I think we can come to a conclusion using this..... but I don't know how

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  3 months ago, # ^ |
                  Rev. 2   Vote: I like it 0 Vote: I do not like it

                  Have you read the proof? It shows why you can always find a solution. Hence you never need to output -1.

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

                  oh sorry, my bad....thanks