Need help in debugging 982D-Shark

Правка en1, от gomu, 2018-05-31 17:15:12

I am trying to solve the problem 982 D — Shark. I am unable to figure out why my Solution is giving wrong answer. Can anyone help me find why I am getting a Wrong Answer? Thank You in advance.

I have used the par(), mergeSet() functions and sz, se arrays to implement the Disjoint Set. My approach is to rebuild(using array color for the same) the array after sorting and maintaining the number of segments using a map and trying to find what minimal value maximizes the number of segments.

Теги map, disjoint set

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский gomu 2018-06-01 12:05:02 201
en1 Английский gomu 2018-05-31 17:15:12 637 Initial revision (published)