Problem C in Codeforces Round 916 (Div. 3) has a wrong tag of "greedy"
source link: https://codeforces.com/blog/entry/123839
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Problem C in Codeforces Round 916 (Div. 3) has a wrong tag of "greedy"
https://codeforces.com/contest/1914/problem/C
Consider the following case,
3 10 4 8 4 2 9 10
Out of the choices to use the 3rd quest are either (4) or (9), greedy would ideally choose 9 but if you keep choosing 9 over 4 we end up with the answer as 84 rather than 86
4 > 8 > 9 > 9 > 9 > 9 > 9 > 9 > 9 > 9 = 84 4 > 8 > 4 > 10 > 10 > 10 > 10 > 10 > 10 > 10 = 86
How is it tagged as greedy?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK