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

Автор cosmere, история, 2 года назад, По-английски

I am trying to solve this problem. The editorial for this problem uses the following approach

Can anyone explain me the Inclusion-Exclusion formula shown here?

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

»
2 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Let me suggest a good tutorial for this topic.

https://codeforces.com/blog/entry/64625

Once you understand the tutorial, the problem should become easier :)

»
2 года назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

lol, that is the exact same problem as https://dmoj.ca/problem/acc7p4. I copy pasted my code and passed.