Help with ICPC NERC problem J

Revision en1, by OussamaJB, 2020-01-31 22:48:16

Hello, I just came up with this greedy approach for problem J of ICPC NERC regionals 2020 : 1- Pick up the most frequent icon i 2- Let N be the number of occurrences of i . Start from i+1 and check if that value is a valid size. 3- If it's not valid , decrement the value and check again until you find a valid size . Can you give me a counter-example where this strategy fails ? I would really appreciate that, mainly because I keep getting WA on test 3 but I'm unable to see the input . submission: http://codeforces.me/contest/1267/submission/69922610 Thank you for your attention.

Tags #acm-icpc, #greedy, #help me

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English OussamaJB 2020-01-31 22:48:16 622 Initial revision (published)