Guendabiaani's blog

By Guendabiaani, history, 7 weeks ago, In English,

Today I participated in the Div.2 Round 632 and solved all the 1200 level problems of sorting and binary search from my list. I will write the main takeaways for self reference.

Div. 2 Round 632:

Contest experience

Sorting:

492B - Ваня и фонари

Solution

519B - A и B и ошибки компиляции

Solution

456A - Ноутбуки

Solution

1294B - Сбор посылок

Solution

977C - Меньшие или равные

Solution

Binary Search:

755B - Польшар и Игра

Solution

911B - Два торта

Solution

1260B - Получи два нуля

Solution

743B - Хлоя и последовательность

Solution

1221C - Идеальная команда

Solution
 
 
 
 
  • Vote: I like it
  • +15
  • Vote: I do not like it

»
7 weeks ago, # |
Rev. 5   Vote: I like it 0 Vote: I do not like it

In the problem 519B — A and B and Compilation Errors, there is an easier way to solve it.

There is a way to use map too, my code

===========================================================

In the problem 456A — Laptops

there is a simpler way to solve it, if there is exist a pair with different number, we output "Happy Alex", My code

===========================================================

In the problem 775B — PolandBall and Game

you can use another formula `cout << (n + map.size() % 2 > m ? "YES" : "NO")

and it is really simple to implement by set or map

===========================================================

In the problem 1260B — Obtain Two Zeroes

It is fast to use math but can still do binary_search like this

  • »
    »
    7 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks for the clever alternatives :)

    • »
      »
      »
      7 weeks ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Thanks, do you want to join my team so that we could take part in virtual contest together ?