checkMate09's blog

By checkMate09, history, 9 years ago, In English

Hello Codeforces, Recently i face a problem that when a problem is judged wrong answer i can't wait to detect the wronged the test case by my self and i use the jury's answers. a) what is the time u spend on detecting the wronged answer by your self ? b) average time before u use the tutorial of the problem ? Thanks , :)

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

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

a) To be honest if I'm upsolving or just practicing on Codeforces or any other website that has test feedback, then I have zero patience and check it out immediately. There are, however, many other websites such as SPOJ, Hackerrank, Codechef that do not give you the tests you get WA on. In such cases just writing a test generator with random inputs and a slow solution works in 95% of the time and is quite quick to code.

b) Heavily depends on whether I have some intuitive feeling about the problem and whether I like the problem or not. Problems that I find interesting and cool I spend a lot of time on. Similarly, if I have some intuitive idea I spend some time trying to develop it into a solution, but if I have no clue about the nature of the solution nor do I like the problem — I might jump to the tutorial very very quickly. The times in different cases differ very much.

Note : This is simply what I do, it is surely not the best approach.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    from your answer to question (a) part 1. i can reach to conclusion that you can be red even your practice on the point of detecting the wronged test case on your own the part 2 of the answer you tell that on some online judges you have n option but to find it your self so, to be sure of my conclusion :D i have to ask you if we have classified online judges into two parts 1 ) that shows you test cases while other don't what is the percentage of your practice on part 1 as well as part 2 of the online judges. between thank you for your answer :)

    • »
      »
      »
      9 years ago, # ^ |
      Rev. 4   Vote: I like it +2 Vote: I do not like it

      Well a large portion of my training is on actual competitions rather than practicing. I suppose for the practice part you could call it 50% to 50% for the two types of judges, but the actual competition participation is more than the practicing.

      As you can guess, during a competition (virtual Codeforces participation too, I enjoyed those a lot in the past) you can't see the test so you have to test.

      So while it is okay to look at tests without too much patience, you shouldn't spoil yourself by only doing that, because on a real competition you won't be ready for the debugging.

      P.S.

      Nowadays we have so many programming websites that there's some competition all the time. There are also long challenges like those in Codechef that can keep you occupied for larger periods of time and as mentioned virtual participations are always an option.

      P.S.S.

      By competition participation I don't only mean 2-3-4-5 hour long contests. I actually enjoy those that last for some days more as you can really give the problems more thought even if you're busy with your daily life.

»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Also some people not realize that many problems at SPOJ, UVA and other websites are from some competitions. So what you can do (if you are desperate to find the answer) is to google problem statement (or, if website actually shows you where this problem was taken from — like "Central Europe 2007 contest") and find that competition's website. There you can usually download judge tests and judge answers to test. In 99% if you solution gives correct answers for original problem, it won't fail in online judge.

My own thoughts on this topic are mixed... In contests I usually try to write random tests. Usually I do it in Python. Another way to to go for corner cases. Sometimes "rubber duck" method works well. I don't tend to spend hours if I have access to testcases. Maybe this is why I am not red :)