ACM
文章平均质量分 87
zhaosdfa
这个作者很懒,什么都没留下…
展开
-
HDU 4399 Query multiset 解法
网上看到的multiset解法。就是把每个不同的位置放到multiset里面,然后查询的时候找到比他大的第一个数 即lower_bound(); 更新的是在集合里面插入和删除就行了 。不知道为什么用的multiset ,位置是没有重复的啊 然后换成 set后也可以AC。 1 #include 2 #include 3 #include 4 #include 5原创 2013-08-16 14:21:44 · 601 阅读 · 0 评论 -
UVA 11039 - Building designing
Building designing An architect wants to design a very high building. The building will consist of some floors, and each floor has a certain size. The size of a floor must be greater than th原创 2013-08-16 14:21:53 · 576 阅读 · 0 评论 -
TYVJ 1014 乘法游戏
背景 Background太原成成中学第2次模拟赛 第四道描述 Description乘法游戏是在一行牌上进行的。每一张牌包括了一个正整数。在每一个移动中,玩家拿出一张牌,得分是用它的数字乘以它左边和右边的数,所以不允许拿第1张和最后1张牌。最后一次移动后,这里只剩下两张牌。 你的目标是使得分的和最小。 例如,如果数是10 1 50 20原创 2013-11-25 22:55:19 · 973 阅读 · 0 评论 -
TYVJ 1020 寻找质因子
描述 Description数轴上有N个点,任意两点连线得到n(n-1)条线段,试求线段的总长。输入格式 InputFormat第一行,一个整数N,表示点数。接下来N行,每行一个整数X_i,表示点的坐标。输出格式 OutputFormat一个整数,表示线段的总长。样例原创 2013-11-26 13:13:54 · 551 阅读 · 0 评论 -
POJ 3009
Curling 2.0Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9410 Accepted: 3982DescriptionOn Planet MM-21, after their Olympic games this year, curling原创 2013-12-15 01:03:21 · 389 阅读 · 0 评论 -
TYVJ 1023 奶牛的锻炼
奶牛的锻炼背景 BackgroundUSACO描述 Description奶牛Bessie有N分钟时间跑步,每分钟她可以跑步或者休息。若她在第i分钟跑步,可以跑出D_i米,同时疲倦程度增加1(初始为0)。若她在第i分钟休息,则疲倦程度减少1。无论何时,疲倦程度都不能超过M。另外,一旦她开始休息,只有当疲惫程度减为0时才能重新开始跑步。在第N分钟后原创 2013-12-15 20:03:43 · 637 阅读 · 0 评论 -
TYVJ 1022 进制转换
进制转换背景 Background太原成成中学第3次模拟赛 第2道描述 Description对于十进制整数N,试求其-2进制表示。例如,因为 1*1 + 1*-2 + 1*4 + 0*-8 +1*16 + 1*-32 = -13 ,所以(-13)_10 = (110111)_-2。输入格式 InputFo原创 2013-12-15 19:07:47 · 1012 阅读 · 0 评论 -
POJ 3278
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 40052 Accepted: 12475DescriptionFarmer John has been informed of the location of a fugitiv原创 2013-12-14 23:55:23 · 514 阅读 · 0 评论 -
UVA 1422 (LA 4254)- Processor
An ``early adopter" Mr. Kim bought one of the latest notebooks which has a speed-controlled processor. The processor is able to operate at variable speed. But the higher the speed, the higher the powe原创 2013-12-17 19:49:26 · 887 阅读 · 0 评论 -
LA 2678 UVA 1121 - Subsequence
A sequence of N positive integers (10 N , each of them less than or equal 10000, and a positive integerS (S are given. Write a program to find the minimal length of the subsequence of consecutive原创 2014-02-17 20:06:49 · 649 阅读 · 0 评论 -
zoj 3778 Talented Chef
Talented ChefTime Limit: 2 Seconds Memory Limit: 65536 KB As we all know, Coach Gao is a talented chef, because he is able to cookM dishes in the same time. Tonight he is going to h原创 2014-05-04 23:48:56 · 538 阅读 · 0 评论 -
HDU 4521 小明系列问题——小明序列
小明系列问题——小明序列Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1552 Accepted Submission(s): 456Problem Description 大家都知道小明最喜欢研究跟序列有原创 2014-04-21 12:38:58 · 393 阅读 · 0 评论 -
UVALive (LA) - 3942 UVa 1401 Trie
Neal is very curious about combinatorial problems, and now here comes a problem about words. Knowing that Ray has a photographic memory and this may not trouble him, Neal gives it to Jiejie.Since原创 2014-05-06 16:12:31 · 468 阅读 · 0 评论 -
POJ 3295 Tautology
TautologyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8983 Accepted: 3435DescriptionWFF 'N PROOF is a logic game played with dice. Each die has six原创 2014-04-23 14:59:04 · 500 阅读 · 0 评论 -
BZOJ 1588: [HNOI2002] 营业额统计
1588: [HNOI2002]营业额统计Time Limit: 5 Sec Memory Limit: 162 MBSubmit: 7881 Solved: 2596[Submit][Status]Description营业额统计Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。Tiger拿出了公司的账本,账本原创 2014-06-04 00:49:59 · 441 阅读 · 0 评论 -
UVA 11020 - Efficient Solutions
Problem IEfficient SolutionsInput: Standard InputOutput: Standard Output"Our marriage ceremonies are solemn, sobermoments of reflection; also regret, disagreement,argument and mu原创 2014-06-03 23:17:22 · 434 阅读 · 0 评论 -
HDU 4101 Ali and Baba
Ali and BabaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1359 Accepted Submission(s): 287Problem DescriptionThere is a rectang原创 2014-06-26 09:22:10 · 846 阅读 · 0 评论 -
POJ 3134 - Power Calculus
Power CalculusTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 1666 Accepted: 884DescriptionStarting with x and repeatedly multiplying by x, we can c原创 2014-06-26 14:44:58 · 489 阅读 · 0 评论 -
POJ 1321 - 棋盘问题
棋盘问题Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 21574 Accepted: 10712Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对原创 2014-06-26 09:57:08 · 339 阅读 · 0 评论 -
HDU 1429 胜利大逃亡(续)
胜利大逃亡(续)Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4692 Accepted Submission(s): 1580Problem DescriptionIgnatius再次被魔王抓走了(搞不懂他原创 2014-06-27 14:11:14 · 428 阅读 · 0 评论 -
HDU 1226 - 超级密码
超级密码Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2242 Accepted Submission(s): 711Problem DescriptionIgnatius花了一个星期的时间终于找到了传说原创 2014-06-27 16:27:23 · 444 阅读 · 0 评论 -
UVa 10391 - Compound Words (字符串hash)
Compound WordsTime Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu[Submit] [Go Back] [Status] DescriptionProblem E: Compound WordsYou are to原创 2014-07-20 08:58:26 · 372 阅读 · 0 评论 -
UVaLive LA 4726 UVa 1451 - Average (子序列最大平均数 数形结合 斜率优化 单调队列)
AverageTime Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu[Submit] [Go Back] [Status] DescriptionA DNA sequence consists of four letters, A, C原创 2014-07-21 09:26:05 · 855 阅读 · 0 评论 -
UVaLive 4851 UVa 1468 - Restaurant (思维)
RestaurantTime Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu[Submit] [Go Back] [Status] Description Mr. Kim is planning to open a new resta原创 2014-07-21 14:14:51 · 635 阅读 · 0 评论 -
UVa 11054 - Wine trading in Gergovia(扫描法 水题)
Wine trading in GergoviaTime Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu[Submit] [Go Back] [Status] Description2006/2007 ACM Internationa原创 2014-07-20 09:52:25 · 434 阅读 · 0 评论 -
ZOJ 3791 An Easy Game (DP)
An Easy GameTime Limit: 2 Seconds Memory Limit: 65536 KB One day, Edward and Flandre play a game. Flandre will show two 01-strings s1 and s2, the lengths of two strings are n. The原创 2014-07-01 10:26:11 · 455 阅读 · 0 评论 -
UVaLive LA 4356 - Fire-Control System (扫描法 思维)
Fire-Control SystemTime Limit:3000MS Memory Limit:Unknown 64bit IO Format:%lld & %llu[Submit] [Go Back] [Status] DescriptionA new mighty weapon has just be原创 2014-07-22 10:30:13 · 1171 阅读 · 0 评论 -
HDU 4620 - Fruit Ninja Extreme (DFS)
Fruit Ninja ExtremeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1136 Accepted Submission(s): 305Special JudgeProblem Description原创 2014-07-01 20:22:56 · 346 阅读 · 0 评论 -
HDU 1214 - 圆桌会议
圆桌会议Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2931 Accepted Submission(s): 2040Problem DescriptionHDU ACM集训队的队员在暑假集训时经常要讨论自原创 2014-07-02 15:55:45 · 432 阅读 · 0 评论 -
POJ 2488 - A Knight's Journey (DFS)
A Knight's JourneyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 29140 Accepted: 9995DescriptionBackgroundThe knight is getting bored of seeing the s原创 2014-07-02 08:08:06 · 424 阅读 · 0 评论 -
UVaLive LA 5052 UVa 1481 - Genome Evolution (很巧妙的思维)
Xi, a developmental biologist is working on developmental distances of chromosomes. A chromosome, in the Xi's simplistic view, is a permutation fromn genes numbered 1 to n. Xi is working on an evolu原创 2014-07-22 21:50:43 · 615 阅读 · 0 评论 -
POJ 2104 | HDU 2665 - K-th Number (划分树)
K-th NumberTime Limit: 20000MS Memory Limit: 65536KTotal Submissions: 36371 Accepted: 11661Case Time Limit: 2000MSDescriptionYou are working for Macrohard原创 2014-07-09 14:53:07 · 492 阅读 · 0 评论 -
2014百度之星初赛第一轮 HDU 4828 - Grids (卡特兰数 逆元)
GridsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 394 Accepted Submission(s): 151Problem Description 度度熊最近很喜欢玩游戏。这一天他在纸上画了一个原创 2014-07-23 19:45:00 · 747 阅读 · 0 评论 -
POJ 1901 | LA 2963 | UVa 1325 - Hypertransmission (思维 扫描)
HypertransmissionTime Limit: 10000MS Memory Limit: 30000KTotal Submissions: 1477 Accepted: 361 Special JudgeDescriptionThe president of the Galactic Federat原创 2014-07-04 12:09:46 · 728 阅读 · 0 评论 -
codeforces 173C Spiral Maximum (递推)
Spiral MaximumTime Limit:3000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionLet's consider a k × k square, divided into unit squares. Please note that原创 2014-07-04 16:45:55 · 449 阅读 · 0 评论 -
UVA 10970 - Big Chocolate Amirkabir University of Technology - Local Contest - Round #2 G
Problem GBig ChocolateMohammad has recently visited Switzerland. As he loves his friends very much, he decided to buy some chocolate for them, but as this fine chocolate is very expensive(You know原创 2013-08-20 20:39:51 · 759 阅读 · 0 评论 -
LA 3902 UVA 1267 - Network
1267 - NetworkTime limit: 3.000 secondsConsider a tree network with n nodes where the internal nodes correspond to servers and the terminal nodes correspond to clients. The nodes are numbered from原创 2013-08-16 14:21:48 · 507 阅读 · 0 评论 -
LA 3602 UVA 1368 - DNA Consensus String
zhaosdfaLA 3602 UVA 1368 - DNA Consensus String Figure 1. DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, name原创 2013-08-20 20:20:26 · 689 阅读 · 0 评论 -
UVA 10635 - Prince and Princess
Problem DPrince and PrincessInput: Standard InputOutput: Standard OutputTime Limit: 3 Seconds Inan n x n chessboard, Prince and Princess plays a game. The squares inthe chessboard are nu原创 2014-03-20 23:52:45 · 524 阅读 · 0 评论 -
UVa 10125 - Sumsets (中途相遇法 hash)
SumsetsTime Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] Description Problem D - Find DUsers are原创 2014-07-02 20:42:31 · 613 阅读 · 0 评论