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

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

Hello everyone, I am Maxim and I am kind of a beginner in programming. Today I took part in the CF Round #840 (Div. 2) and faced some serious problems with problem B. At the beginning, I wasted around 20 mins and 1 submission because I had misread the statement. But it is not interesting. Then I wrote what seemed to be the correcrt solution, but it got WA2. I looked for mistakes and wasted another 2 submissions (and another 30 mins), but the code remained quite the same. Then I decided that a machine finds mistakes better than I so I wrote a brutforce solution. I strategically submitted it and, of course, got TL5. But it passes the second test! I was excited. Finally I can write a random stresstest and find the bug. I ran it and it found nothing! I was shocked. But I decided to fight till the end, so I made up the trick: if(n<=20) ans = brute(n,k,h,p); else ans = solve(n,k,h,p); Of course it is a bad solution because it gets TL on some particular tests. But I felt like a casino player who goes all in. And it passed pre-tests. But it was too late, because by that moment I have wasted 90 mins and sent 5 wrong submissions. So I knew that I anyway will get negative delta and felt kind relaxed. And, to my surprise, my submission passed the final tests! So, if you have faced the similar problem with test 2 or just have some valuable advice, please be welcome in the comment section.

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

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

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