题意:塔防。给1--n,给出m个塔,每个塔有攻击力,给出k个怪兽的位子和血量,问有几只可以到达n点。
今天刚刚复习了树状数组,就碰到这个题,区间更新、区间求和类型。第三类树状数组可以斩。
注意一下大数即可。
#include
#include
#include
using namespace std;
__int64 tree1[100010],tree2[100010];
...
分类:
其他好文 时间:
2014-08-20 22:42:08
阅读次数:
233
同上,区间更新,单点查询。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define eps 1e-12
#define INF 0x7fffffff
#define maxn 100010
using namespace std;
#pragma ...
分类:
其他好文 时间:
2014-08-20 16:25:52
阅读次数:
192
A Simple Problem with Integers
Time Limit: 5000MS
Memory Limit: 131072K
Total Submissions: 61936
Accepted: 18934
Case Time Limit: 2000MS
Description
You have N i...
分类:
其他好文 时间:
2014-08-18 14:34:42
阅读次数:
270
Description
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city counci...
分类:
其他好文 时间:
2014-08-16 13:53:40
阅读次数:
679
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
Description
Given a binary number, we are about to do some operations on the number. Two types of operations can be here.
'I i j' which means invert the bit from
i to j (inclusive)
'Q i' a...
分类:
其他好文 时间:
2014-08-14 14:10:59
阅读次数:
215
Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones.
Your task is counting the segments of different colors you can see at last.
...
分类:
其他好文 时间:
2014-08-14 10:47:38
阅读次数:
222
poj3468 A Simple Problem with Integers( m - ( m >> 1 ) )这里跪了几发。。 - 的优先级大于 >> 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #incl...
分类:
其他好文 时间:
2014-08-14 01:10:37
阅读次数:
343
Description
Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.
There is a very long board with length L...
分类:
其他好文 时间:
2014-08-13 22:28:57
阅读次数:
401
Problem Description
In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same...
分类:
其他好文 时间:
2014-08-13 18:59:07
阅读次数:
226