题目大意:给你n张牌,排成一排放在桌子上,可以从左端拿也可以从右端拿.现在有A,B两人轮流取牌,A先取,两人足够聪明,即都想取最大的牌总和,问A能取到的最大值. 解题思路:定义dp[i][j][k].k只有0,1,表示在i->j这段区间内分别取左右两端能取到的最大总和. #include<bits/stdc++.h> using namespace std; typedef long long INT; #define min(a,b) ((a)<(b)?(a):(b)) #def…
Play Game Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4597 Description Alice and Bob are playing a game. There are two piles of cards. There are N cards in each pile, and each card has a score. They take tur…
D - Fox And Jumping Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 512B Description Fox Ciel is playing a game. In this game there is an infinite long tape with cells indexed by integer…
Play Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 1274 Accepted Submission(s): 737 Problem Description Alice and Bob are playing a game. There are two piles of cards. There are N cards in…
Multiplication Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10010 Accepted: 6188 Description The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one…
传送门:http://poj.org/problem?id=1651 Multiplication Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13109 Accepted: 8034 Description The multiplication puzzle is played with a row of cards, each containing a single positive intege…
Blocks Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5252 Accepted: 2165 Description Some of you may have played a game called 'Blocks'. There are n blocks in a row, each box has a color. Here is an example: Gold, Silver, Silver, Sil…