Блог пользователя OussamaJB

Автор OussamaJB, история, 4 года назад, По-английски

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.com/contest/1267/submission/69922610 Thank you for your attention.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится