Блог пользователя AbdAl-mateen

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

Hi? I'm struggling with this problem https://mirror.codeforces.com/contest/468/problem/B

I thought about this a lot, but still don't know where I messed!

Solution: 80961934

My approach was straight forward, for each element, e, I checked if there is a — e or b — e, if it's then I take the element the the appropriate group. Kind of DSU approach.

Thanks.

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