DR.MANHATTAN's blog

By DR.MANHATTAN, 7 years ago, In English

contest — 811

Highlights

_ Questions attempted_ : 2

### ** 1st got accepted A. Vladik and Courtesy ### ** 2nd got hacked B. Vladik and Complicated Book

Question Discussion:

A. Vladik and Courtesy

  • A fairly easy implementation based question.

    -The one who finished the question first , took about 1 minute to do this question, however, I took about half an hour.Moreover, I got my first submission wrong, as I did not totally understand the question clearly enough. I got it right on the second attempt though.

    B. Vladik and Complicated Book
  • I instinctively knew that the solution I provided was suboptimal, but I knew no other way to attempt this question, other than to use sort again and again for each query.

  • Initially, it did pass the pretests ( I didn't know that there were more test-cases that would be run on it later ), and I couldn't believe my luck. Unfortunately, it got hacked in a few minutes :-/.
  • After the contest ended, I went through the editorial ( quickly understood how I could fix the time complexity bottleneck ) and quickly coded up the solution, got AC !!

RESULT : SPECIALIST__ (1404) ( seems like codeforces rating system rewards newbies generously )

Reflection : :

  • Try to read and understand questions quick, keeping in mind the corner cases, and touch the keyboard only after you're convinced that you've thought of all possible corner cases

  • If the solution that you've thought of would get a TLE , due to the constraints of the problem, then don't push your luck. Producing a solution not keeping in mind the constraints is as good as not submitting a solution ( it's even worse, as you lose points as penalty )

  • The first 2 problems are doable by me (considering my present skill level ), as they do not require any algorithmic/ data structure knowledge. Just implementation skill and the skill to spot a pattern / reduce time complexity.

  • The other problems C ,D ,E , do requre algorithmic knowledge... I'll get there once I study up those Algo's and have enough practice to be able to attempt them in competitions.

  • Vote: I like it
  • -28
  • Vote: I do not like it