
基础题
squee_spoon
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVa11040 - Add bricks in the wall
题意:45块石头堆砌起来从上到下1,2,3,...,9块。每块上的数是下面两块的和。原创 2014-07-25 17:57:15 · 655 阅读 · 0 评论 -
hdu 4788 Hard Disk Drive
题意:原创 2014-10-30 11:13:20 · 535 阅读 · 0 评论 -
Codeforces Round #272 (Div. 2) A
A. Dreamoon and Stairs题意:原创 2014-10-13 00:16:01 · 448 阅读 · 0 评论 -
hdu 4772 Zhuge Liang's Password
题意:给两个矩阵,可以旋转原创 2014-10-30 11:04:15 · 518 阅读 · 0 评论 -
hdu 4802 GPA
题意:计算GPA。 思路:按din原创 2014-10-30 11:06:47 · 527 阅读 · 0 评论 -
hdu 5003 Osu!
题意:给n个数,原创 2014-11-19 20:46:22 · 512 阅读 · 0 评论 -
hdu 5122 K.Bro Sorting
题意:一个类似于冒泡排序的排序方法,每次随机选一个数,如果它右边的数比它小,就一直往右交换,问在rp最好的情况下,需要选几次。 思路:后往前扫一遍数组,发现需要交换的话,象征性交换一次(一直交换去模拟会超时),统计交换了多少次就行了。#include#include#include#include#include#include#include#incl原创 2014-11-29 18:32:37 · 894 阅读 · 0 评论 -
Codeforces Round #285 (Div. 2) C
C. Misha and Forest 题意:一个无环的无向图,知道每个点连的边数和相邻点的异或和,求所有的边。 思路:模拟。弄一个队列维护叶子(度为1的点),删叶子维护异或和,新的叶子入队。#include #include #include #include #include #include #include #inc原创 2015-01-12 20:34:52 · 516 阅读 · 0 评论 -
hdu 5154 Harry and Magical Computer
题意:问拓扑排序是否能成功排序。 思路:dfs。使用两种节点标记,1表示开始进行排序,2表示已经排序完成。如果搜到了标记为1的点,说明失败。#include #include #include #include #include #include #include #include #include #include using namespace std原创 2015-01-03 22:52:22 · 591 阅读 · 0 评论 -
hdu 5214 Movie
给公式算n个区间的左右边界,求3个不重叠的区间,水题坑了好久。。。先计算再处理左右边界的对调,然后贪心找三个区间就行。#include #include #include #include #include #include #include using namespace std;const int maxn = 1e6+10;#define ll unsigned原创 2015-05-02 22:26:14 · 708 阅读 · 1 评论 -
Codeforces Round #271 (Div. 2) B
B. Worms题意:原创 2014-10-07 10:51:32 · 466 阅读 · 0 评论 -
Codeforces Round #271 (Div. 2) A
A. Keyboard原创 2014-10-07 10:56:02 · 513 阅读 · 0 评论 -
hdu 5078 Osu!
题意:原创 2014-10-22 20:04:04 · 449 阅读 · 0 评论 -
Codeforces Round #259 (Div. 2) A. Little Pony and Crystal Mine
A. Little Pony and Crystal Minetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwilight Sparkle once got a原创 2014-08-02 03:14:21 · 646 阅读 · 0 评论 -
Codeforces Round #259 (Div. 2) B. Little Pony and Sort by Shif
B. Little Pony and Sort by Shifttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day, Twilight Sparkle i原创 2014-08-02 03:08:24 · 626 阅读 · 0 评论 -
Codeforces Round #267 (Div. 2) B
B. Fedor and New Game 题意:输入m+1个数,判断qian原创 2014-09-19 10:54:52 · 566 阅读 · 0 评论 -
Codeforces Round #268 (Div. 1) A
A. 24 Game 题意:原创 2014-09-20 23:37:13 · 472 阅读 · 0 评论 -
Codeforces Round #261 (Div. 2) A
A. Pashmak and Garden题意:在坐标系内,g原创 2014-08-16 14:05:52 · 468 阅读 · 0 评论 -
Codeforces Round #266 (Div. 2) A
题意:坐n站di原创 2014-09-13 03:06:47 · 418 阅读 · 0 评论 -
Codeforces Round #269 (Div. 2) B
题意:n个数,好。原创 2014-09-27 01:46:33 · 498 阅读 · 0 评论 -
Codeforces Round #269 (Div. 2) A
题意:6个数,看看是不是能先tiao'chu原创 2014-09-27 01:37:12 · 474 阅读 · 0 评论 -
hdu 5223 GCD
贪心,读到一个区间i,就用尽量小的数乘上去使得区间内每个数是ansi的倍数。最后检查一下区间gcd是否合法就行了。#include #include #include #include using namespace std;const int maxn = 1e6+10;const int mod = 1e9+7;#define ll long long ll gcd(原创 2015-05-02 22:59:13 · 651 阅读 · 0 评论