This problem can be solved using DP. Let
sum[j] - sum of elements from i-th position till j-th position
f1[j] - first player score on this table
f2[j] - second player score on this table
f2[j]=sum[j]-f1[j].
answer is f1[1][n] and f2[1][n]
Search found 2 matches
- Thu Jun 17, 2004 11:40 am
- Forum: Algorithms
- Topic: A Game - Usaco Sec 3 problem
- Replies: 2
- Views: 1828
- Tue Apr 13, 2004 11:58 am
- Forum: Algorithms
- Topic: DFSID
- Replies: 1
- Views: 1775
DFSID
Please, tell me what is DFSID algorithm. And what is difference between DFS and DFSID