随笔分类 -  dp

摘要:RobberiesTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionThe aspiring Roy the Robber has seen a lot of Americ... 阅读全文
posted @ 2015-02-03 20:52 92度的苍蓝 阅读(247) 评论(0) 推荐(0)
摘要:1 #include 2 int a[1000] , temp[1000] ; 3 int n , top ; 4 5 int binary_search (int x) { 6 int fir = 0 ; 7 int last = top ; 8 int mid ; 9... 阅读全文
posted @ 2015-02-03 15:29 92度的苍蓝 阅读(286) 评论(0) 推荐(0)
摘要:Bookshelf 2Time Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionFarmer John recently bought another bookshelf for ... 阅读全文
posted @ 2015-02-03 13:20 92度的苍蓝 阅读(187) 评论(0) 推荐(0)
摘要:饭卡Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescription电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就... 阅读全文
posted @ 2015-02-03 12:39 92度的苍蓝 阅读(163) 评论(0) 推荐(0)
摘要:Charm BraceletTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionBessie has gone to the mall's jewelry store and... 阅读全文
posted @ 2015-02-03 09:35 92度的苍蓝 阅读(268) 评论(0) 推荐(0)
摘要:Open Credit SystemInput:Standard InputOutput:Standard OutputIn an open credit system, the students can choose any course they like, but there is a pro... 阅读全文
posted @ 2015-02-02 19:10 92度的苍蓝 阅读(322) 评论(0) 推荐(0)
摘要:Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 157635Accepted Submission(s): 36871Problem ... 阅读全文
posted @ 2015-01-26 19:31 92度的苍蓝 阅读(116) 评论(0) 推荐(0)
摘要:2565 水果配载Time Limit: 1 SecMemory Limit: 64 MBSubmit: 1042Solved: 336Description水果销售公司接了一个单子,现要从公司将货运到火车站。水果都用箱子装好了,现有三种型号的,分别重量为910、462、和235kg的。现在有不同装... 阅读全文
posted @ 2015-01-05 10:10 92度的苍蓝 阅读(477) 评论(0) 推荐(0)
摘要:To the Max --------------------------------------------------------------------------------Time Limit: 1 Second Memory Limit: 32768 KB --------------... 阅读全文
posted @ 2015-01-03 13:07 92度的苍蓝 阅读(201) 评论(0) 推荐(0)
摘要:Common SubsequenceTime Limit: 2 SecMemory Limit: 64 MBSubmit: 951Solved: 374DescriptionA subsequence of a given sequence is the given sequence with so... 阅读全文
posted @ 2015-01-02 15:09 92度的苍蓝 阅读(182) 评论(0) 推荐(0)
摘要:2107:Largest Rectangle in a HistogramTime Limit: 1 SecMemory Limit: 64 MBSubmit: 777Solved: 220DescriptionA histogram is a polygon composed of a seque... 阅读全文
posted @ 2014-12-29 10:26 92度的苍蓝 阅读(189) 评论(0) 推荐(0)
摘要:数的计数Time Limit: 1 SecMemory Limit: 64 MBSubmit: 708Solved: 333Description要求找出具有下列性质数的个数(包括输入的自然数n): 先输入一个自然数n( n 2 int main() 3 { 4 int n; 5 ... 阅读全文
posted @ 2014-12-29 09:28 92度的苍蓝 阅读(180) 评论(0) 推荐(0)
摘要:计算直线的交点数Time Limit: 1 SecMemory Limit: 64 MBSubmit: 820Solved: 518Description平面上有n条直线,且无三线共点,问这些直线能有多少种不同交点数。比如,如果n=2,则可能的交点数量为0(平行)或者1(不平行)。Input输入数据... 阅读全文
posted @ 2014-12-27 09:57 92度的苍蓝 阅读(304) 评论(0) 推荐(0)
摘要:免费馅饼Time Limit: 1 SecMemory Limit: 64 MBSubmit: 1576Solved: 577Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落... 阅读全文
posted @ 2014-12-26 14:58 92度的苍蓝 阅读(240) 评论(0) 推荐(0)
摘要:地道战Time Limit: 1 SecMemory Limit: 64 MBSubmit: 959Solved: 615Description大家一定看过地道战的电视吧。话说小兵张嘎有一回也跑去支援地道战了。那是河北的一个小镇里,这个小镇比较复杂,什么样的人都有。所以张嘎不能走大街,只能在地道里走... 阅读全文
posted @ 2014-12-25 20:21 92度的苍蓝 阅读(636) 评论(0) 推荐(0)
摘要:马棚问题Time Limit: 2 SecMemory Limit: 64 MBSubmit: 292Solved: 74Description每天,小明和他的马外出,然后他们一边跑一边玩耍。当他们结束的时候,必须带所有的马返回马棚,小明有K个马棚。他把他的马排成一排然后跟随他走向马棚。因为他们非常... 阅读全文
posted @ 2014-12-25 19:22 92度的苍蓝 阅读(546) 评论(0) 推荐(0)
摘要:滑雪Time Limit: 1 SecMemory Limit: 64 MBSubmit: 587Solved: 219Description小明喜欢滑雪,因为滑雪的确很刺激,可是为了获得速度,滑的区域必须向下倾斜,当小明滑到坡底,不得不再次走上坡或等着直升机来载他,小明想知道在一个区域中最长的滑坡... 阅读全文
posted @ 2014-12-24 14:46 92度的苍蓝 阅读(231) 评论(0) 推荐(0)
摘要:过河卒Time Limit: 1 SecMemory Limit: 64 MBSubmit: 941Solved: 206Description棋盘上A点有一个过河卒,需要走到目标B点。卒行走的规则:可以向下、或者向右。同时在棋盘上的任一点有一个对方的马(如C点),该马所在的点和所有跳跃一步可达的点... 阅读全文
posted @ 2014-12-23 20:28 92度的苍蓝 阅读(547) 评论(0) 推荐(0)
摘要:Description丁丁最近沉迷于一个数字游戏之中。这个游戏看似简单,但丁丁在研究了许多天之后却发觉原来在简单的规则下想要赢得这个游戏并不那么容易。游戏是这样的,在你面前有一圈整数(一共n个),你要按顺序将其分为m个部分,各部分内的数字相加,相加所得的m个结果对10取模后再相乘,最终得到一个数k。... 阅读全文
posted @ 2014-12-20 16:58 92度的苍蓝 阅读(261) 评论(0) 推荐(0)
摘要:1 #include 2 int c[10][100]; 3 int knapsack(int m,int n) 4 { 5 int i,j,w[10],p[10]; 6 for(i=1;ic[i-1][j])17 c[i... 阅读全文
posted @ 2014-12-20 09:33 92度的苍蓝 阅读(137) 评论(0) 推荐(0)

http://images.cnblogs.com/cnblogs_com/Running-Time/724426/o_b74124f376fc157f352acc88.jpg