#include <Seter> - using namespace Orz;
1045: [HAOI2008] 糖果传递
http://www.zybbs.org/JudgeOnline/problem.php?id=1045
RunID | User | Problem | Result | Memory | Time | Language | Code Length | Submit Time |
189027 | Seter | 1045 | Accepted | 14428 kb | 304 ms | C/Edit | 851 B | 2012-01-13 12:45:53 |
555……现在我只能做做傻题了,好桑心……
假设平均数是x,且a1给an了k个(k<0说明是an给a1了-k个),那么总代价就可以算出来:
2114: 完美数
http://www.zybbs.org/JudgeOnline/problem.php?id=2114
RunID | User | Problem | Result | Memory | Time | Language | Code Length | Submit Time |
185268 | Seter | 2114 | Accepted | 776 kb | 20 ms | C/Edit | 998 B | 2012-01-02 19:48:39 |
今天又学到新东西了——如何求比x大的第n个回文数?答案就是,给每个回文数从小到大用自然数连续编号。
我们假设0的编号是1,按照回文数,回文节(前一半位数),编号列表:
2141: 排队
http://www.zybbs.org/JudgeOnline/problem.php?id=2141
RunID | User | Problem | Result | Memory | Time | Language | Code Length | Submit Time |
182939 | Seter | 2141 | Accepted | 9576 kb | 1136 ms | C/Edit | 3633 B | 2011-12-27 19:09:14 |
写了N天,花了N小时各种委以后决定换方法,然后写了1小时就A了……这题的数据范围暴力居然比树套树快T^T
动态维护逆序对数目。每次交换两个数。初始逆序对数归并排序暴力乱求,然后呢?