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

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

Every contest, there are always people who get AC on Problem A within a minute literally before I’ve even finished reading the statement sometimes.

I’m really curious how to do it so fast. Do they just skim the input and output format and instantly understand the pattern? Or is there some trick or habit that helps code so quickly and confidently without overthinking?

To be honest, personally I’ve gotten lucky a few times by just looking at the input and output examples and guessing what the math formula was, but I am not sure if it's a good habit in the long run.

Would love to hear from some experienced contestants. How do you read and process problems so fast, and how do you practice writing code quickly while still being accurate?

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

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

Mostly I solve A's just by finding some patterns in sample tests, or by guessing the solution. You just should consider the fact that it is problem A, which in most cases do not require deep observations. If you can't find a solution, try to analyze sample tests. Additionally, I suggest you to collect some A's from div2 rounds, create a mashup, and try to solve them as fast as possible.

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

A good way to understand problems faster is to start from the end — first, look at the input and output of the problem, then take a quick, continuous glance at the statement to understand its explanation (about 10 to 20 seconds), and then try to solve it. Of course, this is just my opinion. Also, another point is that more experienced and higher-rated participants usually come up with the solution right after this stage without any pause, and if they decide to write the code, they can do it within 10 to 20 seconds and solve the problem in under a minute.

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

usually i get some intuition while reading the question partially i just see the input and output and trust my intuition.

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

Having done this multiple times in the past ..you just skim through the test cases if u see something directly you dont even read the problem and write your code (under 1 min) ... in the case where u dont understand the pattern directly u read the problem and try to look for the main details (under 2 mins) ... if u still dont get it u will have to read the problem statement patiently and then it usually take ~ 5 mins

you have to basically assume you are correct which risks a wrong submission, but they are mostly (>90%) times AC

For higher rated people i think this pattern recognition becomes stronger and they can do B or even C with these type of stuff.