这题是黄巨大出的比赛题.http://poj.org/problem?id=3278DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediatel...
分类:
其他好文 时间:
2014-06-19 00:58:53
阅读次数:
510
POJ2388,题目链接http://poj.org/problem?id=2388题意:水题一道给定n个数,输出中间值,可以用sort,干脆快捷。代码://396K 32MS#include #include int buf[10000];int main(){ int cowsNum; scan...
分类:
其他好文 时间:
2014-06-18 23:53:01
阅读次数:
309
http://poj.org/problem?id=3254 1 #include 2 #include 3 #include 4 #define maxn 1000 5 using namespace std; 6 const int mod= 100000000; 7 8 int dp[...
分类:
其他好文 时间:
2014-06-18 23:48:54
阅读次数:
374
POJ2299,题目链接http://poj.org/problem?id=2299题意:给出长度为n的序列,每次只能交换相邻的两个元素,问至少要交换几次才使得该序列为递增序列。思路:其实就是求逆序数,那么直接向到的就是冒泡了,交换一次,记录一次即可。但是n的范围达到50W,冒泡O(n^2)的复杂度...
分类:
其他好文 时间:
2014-06-18 23:21:12
阅读次数:
214
Problem DescriptionTeacher HU and his 40 students were trapped by the brigands. To show their power, the head of the brigands want to select one peopl...
分类:
其他好文 时间:
2014-06-17 00:28:32
阅读次数:
362
http://poj.org/problem?id=2411这道题用2进制表示1表示放0表示不放。第i行与第i-1行有关。枚举i-1行的每个状态,推出由此状态能达到的i行状态。 1 #include 2 #include 3 #include 4 #define maxn 500 5 #def...
分类:
其他好文 时间:
2014-06-17 00:20:14
阅读次数:
432
http://poj.org/problem?id=2632
Crashing Robots
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 7470
Accepted: 3265
Description
In a modernized warehouse, ro...
分类:
其他好文 时间:
2014-06-16 21:33:01
阅读次数:
195
Wireless Password
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4022 Accepted Submission(s): 1196
Problem Description
Liyuan lives...
分类:
其他好文 时间:
2014-06-16 20:46:46
阅读次数:
309
Problem E: 交通工具信息
Description
有一个交通工具类vehicle,将它为 基类派生的有派生小车类car,卡车类truck和轮船类boat,定义这些类,并使其能够显示其各类交通工具的详细信息。
他们包含的信息,有如下几种:
1.名字 -----与输入的名字相符合
2.时速(km/h) -----最高时速
3.耗油量(L/100km) ...
分类:
其他好文 时间:
2014-06-16 18:40:26
阅读次数:
183
Problem Description
In a factory, there are N workers to finish two types of tasks (A and B). Each type has N tasks. Each task of type A needs xi time to finish, and each task of type B needs yj ti...
分类:
其他好文 时间:
2014-06-15 11:26:42
阅读次数:
195