
2017省赛集训
Chook_lxk
你前程有在,但须澄心猛省,不可自甘堕落。
展开
-
Codeforces - 748B Santa Claus and Keyboard Check(字符串水题)
点击打开题目链接B. Santa Claus and Keyboard Checktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSanta Claus原创 2017-04-06 22:44:22 · 533 阅读 · 0 评论 -
HDU - 4970 Killing Monsters(思维)
点击打开题目链接清明节打了一天的组队赛,本弱猪身心俱疲,又一次真真切切的感觉到自己弱的掉渣渣。一名舍友长水痘痘回家了(=。=!都多大了,老兄,关键是谁早上叫我起床啊)出来题后,分分钟看到J题被A掉。excuse me??读了J题,一个ACM队长追心仪女生(=。=!然而本猪毫无头绪)猪友村庄第一次读题这么快,一眼看到这个题,听到大佬在说“线段树”。(=。=!这,就触碰到我知识盲区了)原创 2017-04-02 21:50:28 · 433 阅读 · 0 评论 -
HDU - 5546 Ancient Go(DFS深搜)
点击打开题目链接Problem DescriptionYu Zhou likes to playGowith Su Lu. From the historical research, we found that there are much difference on the rules between ancient go and modern go.Here i原创 2017-04-06 17:31:15 · 677 阅读 · 0 评论 -
POJ - 2386 Lake Counting(DFS连通块水题)
点击打开题目链接Lake CountingTime Limit:1000MSMemory Limit:65536KTotal Submissions:33863Accepted:16851DescriptionDue to recent rains, water has pooled in va原创 2017-04-06 18:07:56 · 521 阅读 · 0 评论 -
POJ - 1182 食物链(并查集)
点击打开题目链接本弱猪想借这个题梳理一下并查集的用法。并查集是用来判断两个元素是否为同一集合的数据结构。也就是说,并查集只能合并,无法分割。并查集通过树形结构实现(不是二叉树奥),通过判断每个元素的根节点是否相同来判断两个元素是否为相同集合。回到这个题上,题目中有x,y,z三类,是“判断是否属于同一类的问题”,显然考察并查集的相关知识,只不过这个题目除了判断是否同类,还增加了捕食关原创 2017-04-02 21:27:08 · 540 阅读 · 0 评论 -
POJ - 2431 Expedition(贪心+优先队列)
点击打开题目链接人一我百,人十我万!追逐青春的梦想,怀着自信的心,永不放弃!教主最帅!!!(=。=!显然最后一句并非原话)今天集训的时候教主投到公屏上的kuangbin大神励志,本弱猪发到这里,共勉一下。回到题目:一辆卡车从A点到B点,中间有N个加油站,每个加油站加油量不等,求使得卡车到达目的地的最小加油次数。还是贪心问题,这里只需要加一个优先队列,把中途的加油站加油量原创 2017-04-03 22:01:06 · 485 阅读 · 0 评论 -
HDU - 2074 叠筐(字符图案)
点击打开题目链接叠筐Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20484Accepted Submission(s): 5353Problem Description需要的时候,就把原创 2017-04-16 20:07:13 · 687 阅读 · 0 评论 -
CodeForces - 707C Pythagorean Triples(数学+规律)
点击打开题目链接C. Pythagorean Triplestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKatya studies in a fift原创 2017-04-16 22:53:10 · 1235 阅读 · 0 评论 -
HDU - 5237 Base64(字符串)
点击打开题目链接Base64Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1285Accepted Submission(s): 578Problem DescriptionMike d原创 2017-05-03 16:08:32 · 1055 阅读 · 0 评论 -
HDU - 5240 Exam(贪心)
点击打开题目链接ExamTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1993Accepted Submission(s): 973Problem DescriptionAs this原创 2017-05-03 22:35:55 · 885 阅读 · 0 评论 -
URAL - 2021 Scarily interesting!(贪心)
点击打开题目链接2021. Scarily interesting!Time limit: 1.0 secondMemory limit: 64 MBThis year at Monsters University it is decided to arrange Scare Games. At the Games all campus gather原创 2017-05-04 21:57:34 · 1067 阅读 · 0 评论 -
URAL - 2020 Traffic Jam in Flower Town(模拟)
点击打开题目链接2020. Traffic Jam in Flower TownTime limit: 1.0 secondMemory limit: 64 MBHaving returned from Sun City, Dunno told all his friends that every shorty may have a personal a原创 2017-05-04 23:48:58 · 1012 阅读 · 0 评论 -
POJ - 3723 Conscription(最大生成树Kruskal)
点击打开题目链接ConscriptionTime Limit:1000MSMemory Limit:65536KTotal Submissions:13061Accepted:4581DescriptionWindy has a country, and he wants to bu原创 2017-04-10 23:45:39 · 510 阅读 · 0 评论 -
Gym - 100819S Surf(DP)
点击打开题目链接题目大意:题目给出每个浪开始的时间,可以获得的幸福点以及每个浪的花费时间,求得最大的幸福点值。以前抗拒DP,但是人还是要进步的。思路:dp[i]为第i秒所能获得的最大幸福点值。状态方程dp[i]=max(dp[i+1],dp[i+wait[i]]+fun[i]);附上AC代码:#include#includeusing namespace std;typ原创 2017-06-06 21:23:04 · 376 阅读 · 0 评论 -
CodeForces - 748C Santa Claus and Robot(思维)
点击打开题目链接C. Santa Claus and Robottime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSanta Claus has Robo原创 2017-04-08 09:01:05 · 642 阅读 · 0 评论 -
CodeForces - 767A Snacktower(模拟+思维)
点击打开题目链接A. Snacktowertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAccording to an old legeng, a l原创 2017-04-08 18:21:08 · 438 阅读 · 0 评论 -
Gym - 101142A Anniversary Cake(水)
点击打开题目链接集训队里第一次组队赛,本弱猪也是第一次用freopen做题,好X的样子。题目出来了,看过题目,三个弱猪异口同声:枚举每一个点的坐标。woc,可不可以专业点啊,那可是10的9次方啊,pass掉。然后村庄猪开口了,我们可以判断线段相交(=。=!),我就想问,和一个一个点枚举有什么区别吗??就这样的水题困了我们20分钟之久(我毫无反驳的承认,我们是弱猪!!)对于这原创 2017-04-01 21:19:23 · 780 阅读 · 0 评论 -
POJ - 1995 Raising Modulo Numbers (快速幂)
点击打开题目链接People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mathem原创 2017-04-04 22:39:21 · 383 阅读 · 0 评论 -
POJ - 3292 Semi-prime H-numbers(水+艾式筛法+打表)
点击打开题目链接Semi-prime H-numbersTime Limit:1000MSMemory Limit:65536KTotal Submissions:9457Accepted:4202DescriptionThis problem is based on an exercise o原创 2017-04-08 09:38:59 · 419 阅读 · 0 评论 -
HDU - 5867 Water problem(水+打表)
点击打开题目链接Water problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 744Accepted Submission(s): 348Problem Description原创 2017-04-09 19:55:09 · 351 阅读 · 0 评论 -
HDU - 5858 Hard problem(数学)
点击打开题目链接Hard problemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 497Accepted Submission(s): 326Problem Descriptionc原创 2017-04-09 19:42:18 · 709 阅读 · 0 评论 -
CodeForces - 785C Anton and Fairy Tale(二分)
点击打开题目链接C. Anton and Fairy Taletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAnton likes原创 2017-04-09 22:00:42 · 475 阅读 · 0 评论 -
POJ - 3187 Backward Digit Sums(水+全排暴搜)
点击打开题目链接Backward Digit SumsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7311Accepted:4221DescriptionFJ and his cows enjoy playing a m原创 2017-04-10 22:28:57 · 881 阅读 · 0 评论 -
POJ - 2484 A Funny Game(水+博弈)
点击打开题目链接A Funny GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:5729Accepted:3568DescriptionAlice and Bob decide to play a funny gam原创 2017-04-10 21:57:34 · 698 阅读 · 0 评论 -
POJ - 1703 Find them, Catch them (并查集)
点击打开题目链接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. However, the police first needs to id原创 2017-04-04 20:32:46 · 385 阅读 · 0 评论 -
UVALive - 7423 Assigning Workstations(贪心法+优先队列)
点击打开题目链接题目大意:机房管理员负责锁机器,然后对于每一个来机房的人,机房管理员就要给他解锁一台机器,然后他走的时候再锁上机器。为了简化这个繁杂的任务,对于每一个上机完后走的人,不锁机器,在机器m分钟后自动锁定。输入来上机的人数和机器m秒后自动锁定。然后输入每一个人来上机的时间和持续的时间。输出机器不需要解锁的次数(就是人的总次数-机器解锁的次数)结构体记录每一个人来的原创 2017-04-05 11:14:08 · 657 阅读 · 0 评论 -
Gym - 101142K King‘s Heir
点击打开题目链接24K纯水题,被只会break英语的本弱猪一眼看到。题目大意:一个老国王,不生双胞胎,临死前想找一个儿子继位,这个国王有一个毛病,喜新厌旧,生出新儿子就不要老儿子了(这是什么毛病=。=!),儿子18岁就可以继位,求出当老国王死的那一天,已经满18岁的儿子里面的年龄最小的儿子。如果出生在老国王死的那一天,那个儿子就是新国王的不二人选。如果没有人继位就输出-1。这个国家原创 2017-04-01 22:23:04 · 653 阅读 · 0 评论 -
HDU - 5540 Secrete Master Plan(水题)
点击打开题目链接Problem DescriptionMaster Mind KongMing gave Fei Zhang a secrete master plan stashed in a pocket. The plan instructs how to deploy soldiers on the four corners of the city wall. Unfo原创 2017-04-05 22:54:35 · 343 阅读 · 0 评论 -
POJ - 1035 Spell checker(水+字符串字典)
点击打开题目链接Spell checkerTime Limit:2000MSMemory Limit:65536KTotal Submissions:25501Accepted:9329DescriptionYou, as a member of a development team原创 2017-04-18 21:56:34 · 681 阅读 · 0 评论 -
Gym - 101142F Folding(折半)
点击打开题目链接题目大意:Alex喜欢折纸,将一张 W * H 的纸折成 w * h 的纸片,问最少需要折几次。由样例也可以看出,最小次数的情况就是对折除以二的情况。只要一直让纸片的长度和宽度分别除以二,然后计算除以二的次数即可。附上AC代码:#includeusing namespace std;int judge(int X,int x){ int n原创 2017-04-05 22:29:22 · 691 阅读 · 0 评论 -
UVALive - 7636 Rational Grading
点击打开题目链接今天听到了WWe葬爷和战神高博都宣布退役了,一阵心酸。当我一开始看WWe的时候就看的葬爷,他们两个在WWe都贡献了二三十个年头,致敬。题目大意很好懂,唯一绕的点就是如果一条指令是错误的,下一个指令要根据上一次错误的数据继续判断。(T~T请原谅我表达能力差)举例来说如果原数是111;判断++i是否为133;显然是错误的,然后下一条指令是++i是原创 2017-04-05 20:49:47 · 639 阅读 · 2 评论