Recently I've been trying to solve a bronze USACO problem ( The problem is exploration — the first one at this site: http://tjsct.wikidot.com/usaco-nov07-bronze ). I expected it to be an easy one but somehow I couldn't come up with a solution.
Then I found a solution on this http://train.usaco.org/TESTDATA/NOV07.explore.htm . However it seems that in this test case: T = 7, N = 5, the array is (1,-3, 6,7,8) their greedy solution is wrong — at least in my understanding.
Could anyone please help me with the problem? And if you read the above solution and see Im wrong, please tell me.
Thanks in advance :D
P/s: sorry if my english are poor.