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

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

I used AI to fix my grammar, so this blog might look like it was written by AI.

So, recently, I participated in a school contest that had pretests. I was quite sure that I was going to get a high rank; however, after the system tests, I was disappointed to discover that I had forgotten to define int long long (and forgot many other stuffs), which ruined the whole thing.

So, how can I get better at handling pretests? I'm not talking about Codeforces rounds, because on Codeforces, the pretests are equal as the system tests.

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

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

I'm facing the exact same issue too.

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

Get better at problem solving!

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

    You won't understand the feeling of ACing the pretest (which had exactly one test — the sample test), passing the stress test (without realizing that the brute-force code was wrong), and then getting 2/100 on the system tests (passing only 1 out of 50 test cases — the only one you passed was the pretest).

    It is kinda funny ngl.

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

Just get better in problem solving in general

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

might you not mind sharing the contest link

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

One thing that I have noticed in general is, when the idea you are thinking has a very bad implementation, that might not be the intended solution, because most questions have intended solutions based on 1 or 2 ideas. If you feel your way of thinking is clean enough, that is when you implement the solution

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

Learn to generate random tests and write code carefully and clearly (avoid overflow, MLE, RTE, corner cases). It’s less critical in online contests since you can resubmit, but in offline contests it’s essential if you’re starting CP. (I used AI to fix it because my English is bad)

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

because on Codeforces, the pretests are equal the same as the system tests.

That is not true, they are usually same as pretest on Div. 2+ for problems A to D, but in Div. 3/4/Edu, people can spam simple TLE or edge-case hacks to gain a lot of successful hacks with little risk. So you should also be careful of Codeforces' contests too.

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

Stress-test your code. Do not entirely trust pretests/samples

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

Lesson: never define but use type long long directly.