Need help to find a corner case in 468-B problem

Правка en1, от AbdAl-mateen, 2020-05-22 21:49:19

Hi? I'm struggling with this problem https://codeforces.net/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.

Теги #dsu

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский AbdAl-mateen 2020-05-22 21:49:19 435 Initial revision (published)