摘要: 通过分析,要使A>=B并且差值最小。所以只要使sum/2的容量下,B最大就Ok了#include#include#include#include#includeusing namespace std;#define N 5000000int dp[N];struct Node{ int v,... 阅读全文
posted @ 2014-10-17 21:53 keyboard3 阅读(115) 评论(0) 推荐(0) 编辑
摘要: HDU2546:饭卡http://acm.hdu.edu.cn/showproblem.php?pid=2546当我们遇到问题选择物体的价值和顺序相关时就需要,排完序后对其01处理。这题因为当我们小的先点的话则越接近5,然后我们一次取最大值,则我们花的钱就越多。#include#include#in... 阅读全文
posted @ 2014-10-16 22:13 keyboard3 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include #include #include#include#include#includeusing namespace std;int dp[2][10001];struct point{ int t,s;}ps[3001];bool cmp(point A, point B){ ... 阅读全文
posted @ 2014-10-12 15:50 keyboard3 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include #include #include#includeusing namespace std;double num[1000000];void init_arrary(){ for (int i = 1; i > n >> m){ double sum=0,res;... 阅读全文
posted @ 2014-10-12 10:56 keyboard3 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Treasure MapTime Limit:2 Seconds Memory Limit:32768 KBYour boss once had got many copies of a treasure map. Unfortunately, all the copies are now brok... 阅读全文
posted @ 2014-08-19 16:08 keyboard3 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Power NetworkTime Limit:2000MSMemory Limit:32768KTotal Submissions:22987Accepted:12039DescriptionA power network consists of nodes (power stations, co... 阅读全文
posted @ 2014-08-11 20:34 keyboard3 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Drainage DitchesTime Limit:1000MSMemory Limit:10000KTotal Submissions:55893Accepted:21449DescriptionEvery time it rains on Farmer John's fields, a pon... 阅读全文
posted @ 2014-08-11 20:30 keyboard3 阅读(117) 评论(0) 推荐(0) 编辑
摘要: TicketsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 972Accepted Submission(s): 495Problem Descr... 阅读全文
posted @ 2014-08-03 18:23 keyboard3 阅读(440) 评论(0) 推荐(0) 编辑
摘要: ZOJ Problem Set - 3080ChiBiTime Limit:5 Seconds Memory Limit:32768 KBwatashi's mm is so pretty as well as smart. Recently, she has watched the movieCh... 阅读全文
posted @ 2014-08-03 17:52 keyboard3 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Time Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeURAL 1036DescriptionYou are given a number 1 ≤N≤ 50. Every ticke... 阅读全文
posted @ 2014-08-03 17:46 keyboard3 阅读(218) 评论(0) 推荐(0) 编辑