How to solve problem D in codeforces global round 6 (1266D)

Правка en1, от bully....maguire, 2019-12-18 19:55:44

https://codeforces.net/contest/1266/problem/D

Editorial of the problem does not explains how to implement the solution .It only tells what conditions will hold after every operation and at the end (when optimal answer has been reached).

I read few submissions and they used set to solve the problem , for example : https://codeforces.net/contest/1266/submission/67106641

I will be very thankful if someone helps me to understand the solution .

Теги 1266d, #help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский bully....maguire 2019-12-18 19:55:44 511 Initial revision (published)