shad_kidwai's blog

By shad_kidwai, history, 3 years ago, In English

I see the input in the test case is getting trimmed

submission

https://imgur.com/wHpnUyD

1708A — 30

I really would like to know, where my code went wrong.

problem is 1708A — 30

and pretest case is 2.

  • Vote: I like it
  • 0
  • Vote: I do not like it

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

You can't, however you can use cfstress.com which generates a test case that makes your code fail

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

    Hey, thank you for answering. :)

    I tried it but it is currently giving "An error occurred while downloading your submission. Probably Codeforces is down."

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

      Oof. I don't know what to do because it sometimes has issues. Sorry :(

»
3 years ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

For example, if your code failed in 143 test case u can make some int f = 1, and after each test case increase f, when f will become 143 output input (if input is 1 3 5 output "1,3,5"). This helps if there was not any test before which has more testcase than where your code failed (in above example 143) because code will fail before. Also I recommend to check editorial, its faster way to understand your mistake.

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

    Hey, thanks for answering!

    I still didn't your point though.

    https://codeforces.net/contest/1708/submission/164525847

    This is my submission. How will I get output input for 143 f for example as you can see it gets trimmed? Could you show me?

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

      Your code fails on array = {2,3}

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

      make if case like: if(difference from starting tc and current tc == testcase where your code failed) output input, for example your code failed in 43 testcase.

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

    Ur a lifesaver bro!! very smart idea man. thanks.