Axial-Tilted's blog

By Axial-Tilted, history, 3 hours ago, In English

i was too sleepy and decided to quickly solve a problem before sleeping so i submitted a quick code for this problem

https://mirror.codeforces.com/problemset/problem/1132/E

even tho my code is wrong it still passes all 90 tests but while i was trying to prove my solution i realized it was wrong and here is a counter example

889

0 0 0 0 0 0 120 105

here the the answer is 889 but my code outputs 888

271074483

iam just curious how its even possible to pass 90 tests with a wrong code

UPD : the test has been added to the problem and now the submission shows WA on that test

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

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

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

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

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

»
3 hours ago, # |
  Vote: I like it +4 Vote: I do not like it

waiting for the proof by AC meme

»
3 hours ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

[redacted]

  • »
    »
    3 hours ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    iam not sure what u mean but the test case is valid and it means that u have a bag of size 889 and 120 items of weight 7 and 105 items of weight 8

»
79 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

How did u came up with that counter-example? I usually move on to another problem as soon as I get AC.

  • »
    »
    67 minutes ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    i was thinking what my solution even does and realized it doesnt do anything that makes sense

»
51 minute(s) ago, # |
  Vote: I like it +6 Vote: I do not like it

I added this test into the problem

»
51 minute(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

same thing Here

Counter case
  • »
    »
    21 minute(s) ago, # ^ |
    Rev. 2   Vote: I like it +4 Vote: I do not like it

    Done! Sometimes I am amazed by the technologies of Codeforces: I opened a problem that was prepared 14 years ago. It opened in Polygon without any issues. I just added some tests to it and built the package. Everything was compiled and worked perfectly. Such backward compatibility over a span of 15 years is an excellent result!

    • »
      »
      »
      18 minutes ago, # ^ |
        Vote: I like it +2 Vote: I do not like it

      thanks for such great platforms.

»
41 minute(s) ago, # |
  Vote: I like it 0 Vote: I do not like it

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