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

Автор amanbora_001, история, 5 часов назад, По-английски

i am just grinding a problem ( https://mirror.codeforces.com/contest/1991/problem/C ) and i found that this problem is bit different and how can someone came to this idea. is, this types of patterns repeats or it something else. bit confused...someone help

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

»
4 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

however maths theory is limited ,but idea is same in most problems,if you are good in maths mostly number theory then cp is easy for u else u would find cp difficult

»
3 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Whenever a problem is with numbers, but the order of the numbers is not actually important,I think it is easy to look at them as points in a line. If you look at this problem that way, the operation just tells you the distance to that point. Then the 40 operations can give you a hint that it has to do something with O(logN). So if you are imagining the points in a line, you can think "maybe I can think of the points being in range [L,R]" and think how can you cut that range length in half.