随笔分类 -  OJ-POJ

摘要:Task schedule Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 515 Accepted: 309 Special Judge Description There are n preemptive jobs to be 阅读全文
posted @ 2018-06-14 09:29 Roni_i 阅读(322) 评论(0) 推荐(0)
摘要:Genealogical tree Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7101 Accepted: 4585 Special Judge Description The system of Martians' blo 阅读全文
posted @ 2018-06-13 14:40 Roni_i 阅读(214) 评论(0) 推荐(0)
摘要:Sorting It All Out Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 38100 Accepted: 13453 Description An ascending sorted sequence of distin 阅读全文
posted @ 2018-06-13 13:26 Roni_i 阅读(262) 评论(0) 推荐(0)
摘要:"POJ 2184" 【题意】: 有n头牛,每头牛有自己的聪明值和幽默值,选出几头牛使得选出牛的聪明值总和大于0、幽默值总和大于0,求聪明值和幽默值总和相加最大为多少。 【分析】:变种的01背包,可以把幽默度看成体积,智商看成价值,那么就转换成求体积和价值都为正值的最大值的01背包了。 以 TS 作 阅读全文
posted @ 2018-05-16 18:10 Roni_i 阅读(428) 评论(0) 推荐(0)
摘要:【分析】: 首先按横坐标递增给所有点排序。 定义状态dp[i][j]表示从点i向n走一条路L1,从点j向n走另一条路L2(如下图,两条路互不相交,并且L1在L2上面),L1 + L2的最小值。程序中用distance(i, j)表示点i到点j的距离。 如何计算dp[i, j]呢? 我们考虑k = m 阅读全文
posted @ 2018-05-09 18:22 Roni_i 阅读(190) 评论(0) 推荐(0)
摘要:Description The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A 阅读全文
posted @ 2018-04-09 23:52 Roni_i 阅读(220) 评论(0) 推荐(0)
摘要:Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17171 Accepted: 11999 Description In the Fibonacci integer sequence, F0 = 0, F1 = 阅读全文
posted @ 2018-01-25 12:00 Roni_i 阅读(350) 评论(0) 推荐(0)
摘要:Bookshelf 2 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11105 Accepted: 4928 Description Farmer John recently bought another bookshelf 阅读全文
posted @ 2017-12-03 18:36 Roni_i 阅读(162) 评论(0) 推荐(0)
摘要:Stripies Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 18198 Accepted: 8175 Description Our chemical biologists have invented a new very 阅读全文
posted @ 2017-11-28 22:24 Roni_i 阅读(266) 评论(0) 推荐(1)
摘要:Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 53645 Accepted: 17670 Description Farmer John wants to repair a small length o 阅读全文
posted @ 2017-11-28 21:59 Roni_i 阅读(219) 评论(0) 推荐(0)
摘要:题目描述: 大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。 任务描述: 给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列 阅读全文
posted @ 2017-11-14 23:25 Roni_i 阅读(214) 评论(0) 推荐(0)
摘要:Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, 阅读全文
posted @ 2017-11-14 22:28 Roni_i 阅读(291) 评论(0) 推荐(0)
摘要:Avoid The Lakes Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6826 Accepted: 3637 Description Farmer John's farm was flooded in the most 阅读全文
posted @ 2017-11-12 15:05 Roni_i 阅读(181) 评论(0) 推荐(0)
摘要:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unex 阅读全文
posted @ 2017-09-15 13:22 Roni_i 阅读(242) 评论(0) 推荐(0)
摘要:Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each cont 阅读全文
posted @ 2017-09-14 20:27 Roni_i 阅读(366) 评论(0) 推荐(0)
摘要:The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. H 阅读全文
posted @ 2017-09-14 11:52 Roni_i 阅读(251) 评论(0) 推荐(0)