world finals 2017 problem H

Revision en1, by Los_Angelos_Laycurse, 2017-05-27 10:45:02

I have use a O(n^2/31) dynamic programming approach and use bitset optimization and get AC 0.06s..

1873447 09:40:10 Scenery Accepted 0.06 s C++

here is my code:

algorithm correctness have not been proved yet,

http://ideone.com/g5otEq

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Los_Angelos_Laycurse 2017-05-27 10:45:02 272 Initial revision (published)