B -CryptographyTime Limit:5000MSMemory Limit:32768KB64bit IO Format:%lld & %lluSubmitStatusPracticeZOJ 2671DescriptionYoung cryptoanalyst Georgie is p...
分类:
其他好文 时间:
2014-08-15 12:13:40
阅读次数:
322
POJ 2886 Who Gets the Most Candies?(线段树模拟约瑟夫环,高合成数)
ACM
题目地址:POJ 2886 Who Gets the Most Candies?
题意:
N 个小孩围成一圈,他们被顺时针编号为 1 到 N。每个小孩手中有一个卡片,上面有一个非 0 的数字,游戏从第 K 个小孩开始,他告诉其他小孩他卡片上的数字并离开这个圈,他卡片...
分类:
其他好文 时间:
2014-08-15 10:45:28
阅读次数:
213
虐心线段树 感觉写的有点挫#include #include #include #include #include #include #include #include #include #include #include using namespace std;#define lson rt> 1...
分类:
其他好文 时间:
2014-08-15 09:20:37
阅读次数:
220
线段树+离散化。 1 #include 2 #include 3 #include 4 5 #define MAXN 20005 6 #define lson l, mid, rt>1;25 build(lson);26 build(rson);27 }28 29 int q...
分类:
其他好文 时间:
2014-08-15 01:25:26
阅读次数:
267
Description
You are given circular array a0,?a1,?...,?an?-?1.
There are two types of operations with it:
inc(lf,?rg,?v) — this operation increases each element on the segment
[lf,?rg] (inclu...
分类:
其他好文 时间:
2014-08-15 00:01:56
阅读次数:
327
描述生活的暑假刚集训开始,他要决心学好字典树,二叉树,线段树和各种树,但生活在OJ上刷题的时候就遇到了一个特别烦恼的问题。那当然就是他最喜欢的二二叉树咯!题目是这样的:给你一颗非空的二叉树,然后再给你一个整数n,让生活输出这颗二叉树的第n(n>0且n 2 using namespace std; 3...
分类:
其他好文 时间:
2014-08-14 23:34:26
阅读次数:
227
Nice boat
Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 1455 Accepted Submission(s): 645
Problem Description
There is an o...
分类:
其他好文 时间:
2014-08-14 20:49:29
阅读次数:
165
可以用线段树写。虽然有h(1h的情况。线段树保存区间剩余的空间最大值,每次询问+处理同时进行,优先选择左边。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int maxn = 200005 ; 7 8 ...
分类:
其他好文 时间:
2014-08-14 19:29:49
阅读次数:
151
Description
ACM has bought a new crane (crane -- je?áb) . The crane consists of n segments of various lengths, connected by flexible joints. The end of the i-th segment is joined to the beginning...
分类:
其他好文 时间:
2014-08-14 16:50:28
阅读次数:
240
KiKi's K-Number
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2603 Accepted Submission(s): 1202
Problem Description
For the k-...
分类:
其他好文 时间:
2014-08-14 16:47:38
阅读次数:
237