Description After going through the receipts from your car trip through Europe this summer, you realised that the gas prices varied between the cities you visited. Maybe you could have saved some money if you were a bit more clever about where you fi…
http://poj.org/problem?id=3249 Test for Job Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 8206 Accepted: 1831 Description Mr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. No…
任意门:http://poj.org/problem?id=3635 Full Tank? Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8388 Accepted: 2734 Description After going through the receipts from your car trip through Europe this summer, you realised that the gas pri…
题意:略 直接用记忆化搜索就行了 #include<cstdio> #include<iostream> using namespace std; int n,m; int map[105][105]; int len[105][105]={0}; int dp(int x,int y) { int max,temp; if(len[x][y]) return len[x][y]; max=0; if(x+1<n&&map[x][y]>map[x+1][…
Description In the two-player game "Two Ends", an even number of cards is laid out in a row. On each card, face up, is written a positive integer. Players take turns removing a card from either end of the row and placing the card in their pile.…