Description 给你一下长度为 \(n\) 的序列. \(a_i=a_j\) \(l_1 \leqslant i \leqslant r_1\) \(l_2 \leqslant i \leqslant r_2\) 询问满足条件的 \((i,j)\) 对数. Sol 分块+前缀和. 非常乱搞啊 ...
分类:
其他好文 时间:
2016-10-27 23:14:43
阅读次数:
301
A strange lift Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on ...
分类:
其他好文 时间:
2016-10-26 07:09:16
阅读次数:
292
711323 97935537 475421538 1090116118 2032082 120922929 951016541 15898 418373 161478614 149488440 1748022751 21618619576 810918992 241779667 177261674 ...
分类:
其他好文 时间:
2016-09-30 21:30:42
阅读次数:
141
Throughout all this conversation, my eyes flickered again and again to the table where the strange family sat. 从对话的自始自终我的眼睛都一遍又一遍的闪烁在那个奇怪家庭的位置上。 They ...
分类:
其他好文 时间:
2016-09-28 12:43:23
阅读次数:
203
poj.org/problem?id=2891 (题目链接) 题意:求解线性同余方程组,不保证模数一定两两互质。 Solotion 用exgcd将俩个同余方程合并成一个 如合并n%M=R,n%m=r 即M*x+R=m*y+r M*x-m*y=r-R 设a=M/t,b=m/t,c=(r-R)/t,t= ...
分类:
其他好文 时间:
2016-09-27 20:17:25
阅读次数:
193
题意:给定一个浮点数,让你在时间 t 内,变成一个最大的数,操作只有把某个小数位进行四舍五入,每秒可进行一次。 析:贪心策略就是从小数点开始找第一个大于等于5的,然后进行四舍五入,完成后再看看是不是还可以,一循环下去,直到整数位,或者没时间了。 代码如下: ...
分类:
其他好文 时间:
2016-09-24 23:35:04
阅读次数:
204
Balance Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 13717 Accepted: 8616 Description Gigel has a strange "balance" and he wants to pois ...
分类:
其他好文 时间:
2016-09-23 01:27:48
阅读次数:
144
Description Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is d ...
分类:
其他好文 时间:
2016-09-23 01:22:29
阅读次数:
201
Well, this stuff will be a little bit strange if you deal with it first time. Container Object: Just a wrapper / contianer for values No Method No Nou ...
分类:
编程语言 时间:
2016-09-06 06:49:27
阅读次数:
193
Caves and Tunnels Time limit: 3.0 secondMemory limit: 64 MB After landing on Mars surface, scientists found a strange system of caves connected by tun ...
分类:
其他好文 时间:
2016-09-03 22:33:36
阅读次数:
267