Help or insight into USACO January 2020 Bronze Problem 2: Photoshoot

Revision en1, by NexTopper, 2023-08-09 15:32:04

How to solve this Photoshoot problem in O(n) ? The best I could come up with is a O(n^2) idea.Would be greatful for some hints.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English NexTopper 2023-08-09 15:32:04 264 Initial revision (published)