采矿(KOP) 金矿的老师傅年底要退休了.经理为了奖赏他的尽职尽责的工作,决定送他一块长方形地.长度为S,宽度为W.老师傅可以自己选择这块地.显然其中包含的采金点越多越好.你的任务就是计算最多能得到多少个采金点.如果一个采金点的位置在长方形的边上,它也应当被计算在内. 任务:     读入采金点的位置.计算最大的价值. 输入:     文件KOP.IN的第一行是S和W,(1<=s,w<=10 000);他们分别平行于OX坐标和OY坐标,指明了地域的尺寸.接下来一行是整数n (1<=n&l…
Description  Byteman, one of the most deserving employee of The Goldmine of Byteland, is about to retire by the end of the year. The Goldmine management would like to reward him in acknowledgment of his conscientious work. As a reward Byteman may rec…
原文地址:刘汝佳黑书 pku等oj题目[转]作者:小博博Mr 一.动态规划参考资料:刘汝佳<算法艺术与信息学竞赛><算法导论> 推荐题目:http://acm.pku.edu.cn/JudgeOnline/problem?id=1141 简单 http://acm.pku.edu.cn/JudgeOnline/problem?id=2288 中等,经典TSP问题 http://acm.pku.edu.cn/JudgeOnline/problem?id=2411 中等,状态压缩DP…
#include<cstdio> #include<cstring> #include<queue> #include<algorithm> using namespace std; #define INF (1LL<<60) #define MAXN 3333 #define MAXM 3333*3333*2 struct Edge{ int v,next; __int64 cap,flow; }edge[MAXM]; int vs,vt,NE…
Gone Fishing Time Limit: 2000MS   Memory Limit: 32768K Total Submissions: 30281   Accepted: 9124 Description John is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachab…
There is a kind of balanced binary search tree named red-black tree in the data structure. It has the following 5 properties: (1) Every node is either red or black.(2) The root is black.(3) Every leaf (NULL) is black.(4) If a node is red, then both i…
题目描述: 请回答下面的 10 个问题,你的回答应保证每题惟有你的选择是正确的. ⑴ 第一个答案是b 的问题是哪一个?(a )2 ( b ) 3 ( c ) 4 ( d ) 5 ( e ) 6⑵ 恰好有两个连续问题的答案是一样的,它们是:( a ) 2 , 3 ( b ) 3, 4 ( c ) 4 ,5 ( d ) 5 ,6 ( e ) 6 ,7 ⑶ 本问题答案和哪一个问题的答案相同?( a ) 1 ( b ) 2 ( c ) 4 ( d ) 7 ( e ) 6⑷ 答案是a 的问题的个数是:(…
  丘比特的烦恼 题目描述 Description 随着社会的不断发展,人与人之间的感情越来越功利化.最近,爱神丘比特发现,爱情也已不再是完全纯洁的了.这使得丘比特很是苦恼,他越来越难找到合适的男女,并向他们射去丘比特之箭.于是丘比特千里迢迢远赴中国,找到了掌管东方人爱情的神--月下老人,向他求教. 月下老人告诉丘比特,纯洁的爱情并不是不存在,而是他没有找到.在东方,人们讲究的是缘分.月下老人只要做一男一女两个泥人,在他们之间连上一条红线,那么它们所代表的人就会相爱--无论他们身处何地.而丘比特…
1697: [Usaco2007 Feb]Cow Sorting牛排序 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 387  Solved: 215[Submit][Status] Description 农夫JOHN准备把他的 N(1 <= N <= 10,000)头牛排队以便于行动.因为脾气大的牛有可能会捣乱,JOHN想把牛按脾气的大小排序.每一头牛的脾气都是一个在1到100,000之间的整数并且没有两头牛的脾气值相同.在排序过程中,JOHN…
Blocks Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4250   Accepted: 1704 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…