解题报告
题意:
插队完的顺序。
思路:
倒着处理数据,第i个人占据第j=pos[i]+1个的空位。
线段树维护区间空位信息。
#include
#include
#include
using namespace std;
struct node {
int x,v;
} num[201000];
int sum[1000000],ans[201000];
void c...
分类:
其他好文 时间:
2014-08-11 21:34:33
阅读次数:
378
1074. Reversing Linked List (25)
时间限制
300 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
Given a constant K and a singly li...
分类:
其他好文 时间:
2014-08-11 21:30:32
阅读次数:
222
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4902解题报告:输入一个序列,然后有q次操作,操作有两种,第一种是把区间 (l,r) 变成x,第二种是把区间 (l,r) 中大于x的数跟 x 做gcd操作。线段树区间更新的题目,每个节点保存一个最大和最小...
分类:
其他好文 时间:
2014-08-11 17:26:12
阅读次数:
238
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4923解题报告:给出一个长度为n的只包含0和1的序列,是否存在一个序列Bi满足一下条件:1. 0 2 #include 3 #include 4 #include 5 #include 6 u...
分类:
其他好文 时间:
2014-08-11 09:55:31
阅读次数:
274
解题报告
题意:
一根长度8000的线段上染色,求染完之后,每个颜色在线段上有多少个间断的区间。
思路:
区间问题用线段树,成段的更新区间,最后把所有的区间下压到叶子结点,统计叶子结点的颜色。
#include
#include
#include
using namespace std;
int lz[32000],_hash[10000],color[10000],cnt;
v...
分类:
其他好文 时间:
2014-08-11 06:19:21
阅读次数:
258
1073. Scientific Notation (20)
时间限制
100 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
HOU, Qiming
Scientific notation is the way tha...
分类:
其他好文 时间:
2014-08-11 00:25:31
阅读次数:
285
1078. Hashing (25)
时间限制
100 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
The task of this problem is simple: insert a seq...
分类:
其他好文 时间:
2014-08-11 00:24:21
阅读次数:
206
1082. Read Number in Chinese (25)
时间限制
400 ms
内存限制
32000 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
Given an integer with no more than ...
分类:
其他好文 时间:
2014-08-11 00:23:11
阅读次数:
256
解题报告
题意:
求逆序数。
思路:
线段树离散化处理。
#include
#include
#include
#include
#define LL long long
using namespace std;
LL sum[2001000],num[501000],_hash[501000];
void push_up(int rt)
{
sum[rt]=sum[rt...
分类:
其他好文 时间:
2014-08-11 00:22:01
阅读次数:
255
题目链接:http://acm.hnu.cn/online/?action=problem&type=show&id=12885&courseid=274解题报告:一共有n个发射装置,有一个接收装置,接收装置能够正确接收并把接收到的信号准确的译码出来的条件是:Ti > 6 * (B +(T1 + T...
分类:
其他好文 时间:
2014-08-10 23:57:00
阅读次数:
408