BOARD1  Board
Consider a board with fields numbered from 0 to n. On each field i ∈ {1, ..., n} there is an integer (possibly negative) number a_{i} ∈ ℤ. A player is given a pawn on field number 0. Player can move the pawn back and front on distance not exceeding k. A pawn can visit all the fields many 0 and n many times, but it can stop moving definitively only at position n (player decides on when to stop). Whenever a pawn visits field i, the field is cleared and the number a_{i} is removed (if the field wasn’t clear before the move). A player wants to maximize the sum of numbers on noncleared fields.
hide comments
hodobox:
20160704 16:31:54
very concisely: Given fields 0,1,2...N, choose a subset of fields so that from any field the nearest chosen field to the right is at most K units away, such that the sum of all not chosen fields is maximum possible. 

Vamsi Krishna Avula:
20141229 11:58:03
I think the problem statement is not explicit, so here goes my version:


Samuel Nacache:
20140315 19:48:45
Can someone explain second case? If he can't move exceeding 2, can't he move one by one? 

Rishabh Sharma:
20131229 13:16:25
Someone please explain the question. The language is very confusing. What does "A pawn can visit all the fields many 0 and n many times" mean?


Goldie:
20131211 16:47:14
Be careful with negative numbers. Last edit: 20131229 19:42:12 
Added by:  Marek Adamczyk 
Date:  20131128 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 