An USACO probem

Revision en1, by AFatWolf, 2016-06-16 19:05:50

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.

Tags greedy

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English AFatWolf 2016-06-18 18:10:41 400
en1 English AFatWolf 2016-06-16 19:05:50 688 Initial revision (published)