
基本算法-水题
炒饭君
这个作者很懒,什么都没留下…
展开
-
POJ 3993 Not So Flat After All
Not So Flat After AllTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 356 Accepted: 151DescriptionAny positive integer v can be written as p1a1*p2a2*...*原创 2013-09-26 13:40:08 · 1269 阅读 · 0 评论 -
HDU 4022 Bombing(基本算法-水题)
HDU 4022 Bombing(基本算法-水题)题目大意:告诉你n个坐标的点,m各操作,每次操作0表示消除所给x坐标对应的与其x相同点,每次操作1消除所给y坐标对应的点,输出每次消除的点数、解题思路:map 加 mutiset ,水过。原创 2014-08-12 16:14:39 · 1102 阅读 · 0 评论 -
HDU 4006 The kth great number (基本算法-水题)
HDU 4006 The kth great number (基本算法-水题)题目大意:有m组操作,求第K大数。I为insert操作,即插入1个数,Q为询问,输出此时的第K大数。解题思路:一道水题让我智商捉鸡了,居然笨到想去用线段树去做。后来发现1个set搞定,就存K个大数,超过的把小的踢掉,输出第一个即可。原创 2014-08-03 22:07:47 · 1841 阅读 · 2 评论 -
HDU 4007 Dave (基本算法-水题)
HDU 4007 Dave (基本算法-水题)题目大意:告诉你n个点,再告诉你正方形边长,问你这个正方形最多包含多少个点?解题思路:先枚举x在范围内的点,O(n)的效率,然后对x在范围的点中,找出y在范围内的点,这个考虑到n不是很大,排序找出最大的即可,否则要用到线段树。原创 2014-08-03 22:42:34 · 1005 阅读 · 0 评论 -
POJ 3991 Seinfeld
SeinfeldTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 897 Accepted: 440DescriptionI’m out of stories. For years I’ve been writing stories, some rather原创 2013-09-25 23:08:40 · 1195 阅读 · 0 评论 -
POJ 3996 Air Strike
Air StrikeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 389 Accepted: 130DescriptionGeneral Gee is the commander of a military base. He has just recei原创 2013-09-26 13:34:28 · 1239 阅读 · 0 评论 -
POJ 2817 WordStack (暴力)
WordStackTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2940 Accepted: 1021DescriptionAs editor of a small-town newspaper, you know that a substantial原创 2013-10-06 16:26:19 · 1304 阅读 · 0 评论 -
uva 10465 - Homer Simpson
题目大意:有个人喜欢吃汉堡,一种汉堡需要m分钟,另一种汉堡需要n分钟,给你 t 分钟,不浪费任何时间,问你最多吃几个汉堡?如果必须浪费时间,最少的剩余时间,最多的汉堡。解决方法:用暴力算法既可以解决,只需要枚举汉堡的个数就OK原创 2014-01-30 15:06:11 · 1715 阅读 · 0 评论 -
EBCDIC (多校联合赛第九场E题)
这题很坑爹啊。是个打表题,打了很久,还好 1 A了原创 2013-11-02 18:18:55 · 1229 阅读 · 0 评论 -
POJ 3992 Tiles of Tetris, NOT!
Tiles of Tetris, NOT!Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 408 Accepted: 161DescriptionYou’ve really messed up this time. “Go buy some square原创 2013-09-26 13:44:50 · 1834 阅读 · 0 评论 -
uva 11729 Commando War
GCommando WarInput: Standard InputOutput: Standard Output “Waiting for orders we held in the wood, word from the front never cameBy evening the sound of the gunfire was mi原创 2013-10-08 17:17:16 · 247 阅读 · 0 评论 -
uva 11292 Dragon of Loowater (勇者斗恶龙)
Problem C: The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime b原创 2013-10-08 16:59:37 · 1040 阅读 · 0 评论 -
HDU 4021 24 Puzzle (拼图)
HDU 4021 24 Puzzle (拼图)题目大意:给定24个数的位置如图,现在给你24个数,0表示空格,问你是否能由起始位置到终点位置。解题思路:首先空格除外,八个角一定是一样的,然后其它的就得满足(1)如果矩阵列数是奇数,逆序数必须同奇同偶,(2)如果矩阵列数是偶数,逆序数加上0位置的行数之差必须同奇同偶。原创 2014-08-15 19:09:42 · 954 阅读 · 0 评论