OussamaJB's blog

By OussamaJB, history, 5 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it