Bucketsmith's blog

By Bucketsmith, history, 12 months ago, In English

When working on easier problems(like Div1A or Div2B/C), If it took me 10 minutes to get no clues, I would rather jump to some random conclusions that SEEM reasonable. If it passed the examples, I would submit it immediately, spending no time proving my solution. I thought a problem placed at Div1A/Div2B/C couldn't be that hard and I should not waste my time any further. It works and fails from time to time, but more fails on recent contests.

I wonder if some of you guys thought the same way during a contest. Should I give up this strategy anymore?

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

»
12 months ago, # |
  Vote: I like it +8 Vote: I do not like it

on today's hello 2024 contest, i used similar way to solve A by observing if abs(a-b) is even or not

  • »
    »
    12 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I thought of A this way: as long as there are any coins left in either wallet, one can choose to swap or not to make the non-empty wallet in their hand, So the game would definitely proceed a + b turns.

    on problem C, I thought the longest non-increasing subsequence is always the optimal answer which completely makes no sense. I wasted 30 minutes and 2 rejected submissions on it. Sigh.

    • »
      »
      »
      12 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I had a similar thought process in problem A. Then again, the solution could be observed from the sample TC's that whenever a+b is even, bob wins, otherwise alice. (This observation could be derived from the a+b turns thing you mentioned). The point is that a lot of 'easy' problems don't have complicated solutions, apart from maybe some edge cases, therefore your approach seems perfectly fine, specially in a contest where time is of the essence.

    • »
      »
      »
      12 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Man problem C was a mess the solution was so obvious and yet I couldn't figure it out, at one point I was also thinking of some dp strategy to solve the problem but later realized that all I had to do was to swap the top elements for the arrays s and t so that one could maintain a lower element as top than the other.

  • »
    »
    12 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    That's what I did too. I noticed that in the first case, it is 1 1, so I solved it by (a-b). Just figured out whose turn it's going to be when both will be equal and followed the logic in this (1 1 ) case "

»
12 months ago, # |
  Vote: I like it +15 Vote: I do not like it

Happened to me in Hello 2024. Problem B. I was reading the problem statement. Very big. I just randomly scrolled over to the sample testcases. I observed that the answer was based on the count of the symbols. .Without reading the problem, ran the code for the sample testcases, and submitted it. Lucky for me, passed the pretests too. Going to read the problem all over again and do it properly now tho lol.

  • »
    »
    12 months ago, # ^ |
      Vote: I like it +15 Vote: I do not like it

    Also, congrats on becoming grandmaster!

  • »
    »
    12 months ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    yes in 2nd, it was simply the absolute difference of plus and minus sign.

»
12 months ago, # |
  Vote: I like it +19 Vote: I do not like it

wish I have done this, took me time to solve B on today's hello 2024

»
12 months ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

I also did similar thing on yesterday's contest, that I have thought the correct solution of pC but I can neither prove it or disprove it, and the implementation won't take too long, so I decide to just submit it. Even if it didn't pass, I can disprove my solution by WA, and focus on other possible solution. So I guess in this situation it is not a bad strategy. (though there is a drawback that you might got FST when the pretest is weak)

btw, I just realized that logical reasoning is not the only way to solve CP problem, you can guess, you can bruteforce pattern, etc..., thanks to the notorious Goodbye 2023 problem D

»
12 months ago, # |
  Vote: I like it +4 Vote: I do not like it

Yes, guessing the solution is often more efficient than confirming it. I guess that with more experience you can also filter out most blatantly wrong approaches so there's still some filter to it.

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Yeah but sometimes guessing doesn't work by seeing the testcases we might wonder to check whether the sum is even or not but after submitting the solution it might give wrong answer. So we shouldn't rely on guessing rather we should break the problem statement and see what works. It happened with me while giving contests on codechef due to this i have wasted more time on a problem.

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Some problems can be solved just by guessing.

Here is an example: https://codeforces.net/contest/1776/problem/I

»
12 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

It wont work for people who do a lot of mistakes and people who fail at greedy things.Problems A,B,C look they are guessable in Hello 2024 contest but I wasted time in guessing A since there are lot of TC but couldn't find pattern so I finally thought to think about it A. As usual I solved 2 questions and one penalty

»
12 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Yeah guessing from testcases trick is OP. The first time I saw someone doing it was Joshua Chen (numb3r5). I started Hello 2024 like 15 mins late so I had to this for A and B. Altho it does have a drawback that sometimes you fail system tests.