Блог пользователя Negationist

Автор Negationist, история, 2 месяца назад, По-английски

I hate being the guy that spams questioning blogs but... On the problem, Did We Get Everything Covered?, I did the solution but in reverse kind of. Just look at my code and you'll see what I mean, but something is wrong. What?

Code

Edit: I failed test case 140 in test 2.

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
2 месяца назад, # |
Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

Took me way more than I'd like, I wasn't able to find any error on the logic, because it's right!. I even had to bruteforce getting the test case to find out the problem and it's absolutely silly.

Spoiler
Me
  • »
    »
    2 месяца назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I'm dumb asf, I can't wait till I get better at debugging(or just not making these dumb mistakes in the first place) any tips on that?

    • »
      »
      »
      2 месяца назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I don't know either, I spent around an hour trying to come up with a test case or find where it was failing but I couldn't. At the end I surrendered and got the test case from the problem.

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

You can make a submission that outputs the test case 140 so you can see it. Just to be clear, the logic should be something like if the number of test cases is bigger than 140, dont print the output, just print the test case you are interested in.

»
2 месяца назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится
Testcase