Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each village is identified with a single integer coordinate. There are no two villages in the same positio…
Post Office Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 15412 Accepted: 8351 Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each villa…
Post Office Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 15966 Accepted: 8671 Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each villa…
Post Office Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 22278 Accepted: 12034 Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each village…
http://poj.org/problem?id=1160 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 20218 Accepted: 10899 Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the po…
Post Office Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 17168 Accepted: 9270 Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each villa…
Post Office Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18835 Accepted: 10158 Description There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each vill…
题目地址:http://poj.org/problem?id=1276 Description A Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominations, say Dk, k=1…
题目地址:http://poj.org/problem?id=1170 Description In a shop each kind of product has a price. For example, the price of a flower is 2 ICU (Informatics Currency Units) and the price of a vase is 5 ICU. In order to attract more customers, the shop introd…
Tourist Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1503 Accepted: 617 Description A lazy tourist wants to visit as many interesting locations in a city as possible without going one step further than necessary. Starting from his hotel…
题目链接: http://poj.org/problem?id=1239 Increasing Sequences Time Limit: 1000MSMemory Limit: 10000K 问题描述 Given a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of the last number. For…
动态规划:多阶段决策问题,每步求解的问题是后面阶段问题求解的子问题,每步决策将依赖于以前步骤的决策结果.(可以用于组合优化问题) 优化原则:一个最优决策序列的任何子序列本身一定是相当于子序列初始和结束状态的最优决策序列. 只有满足优化原则的问题才可以利用动态算法进行求解,因为只有全局最优解法等于其每个子问题的最优才可以分阶段进行求解. The cows don't use actual bowling balls when they go bowling. They each take a nu…
Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 32977 Accepted: 11208 Description People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some…
Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to schedule her next N (1 ≤ N ≤ 1,000,000) hours (conveniently labeled 0..N-1) so that she produces as much milk as possible. Farmer John ha…
#include <iostream> #define MAXN 305 #define inf 123456789 using namespace std; int _m[MAXN][MAXN]; int _o[MAXN][MAXN]; int _c[MAXN]; int main() { //freopen("acm.acm","r",stdin); int n; int m; int i; int j; int k; cin>>n; c…