线段树 hdu3468 A Simple Problem…
来源:互联网 发布:cp雾化器做芯数据 编辑:程序博客网 时间:2024/06/08 20:50
A Simple Problem with Integers
Time Limit: 5000MSMemory Limit: 131072KTotal Submissions: 22668Accepted: 6080Case Time Limit: 2000MS
Description
Youhave
Input
The first line contains twonumbers
The second linecontains
Each of the next
"C
"Q
Output
You need to answerall
Sample Input
10 5
1 2 3 4 5 6 7 8 9 10
Q 4 4
Q 1 10
Q 2 4
C 3 6 3
Q 2 4
Sample Output
4
55
9
15
Hint
The sums may exceed the range of 32-bitintegers.
#include<stdio.h>
#define L(x) x<<1
#define R(x)(x<<1)+1
struct node
{
}t[100001*4];
int num[100001];
int n,q;
void build(int l,int r,int x)
{
}
void Update(int l,int r,int x,int c)
{
}
__int64 query(int l,int r,intx)
{
return query(l,r,L(x));
return query(l,r,R(x));
}
int main()
{
int i;
scanf("%d",&num[i]);
}
- 线段树 hdu3468 A Simple Problem…
- A Simple Math Problem
- poj 3468 A Simple Problem with I…
- poj 3468 A Simple Problem with I…
- poj 3468 A Simple Problem with I…
- Writing a Simple …
- HDOJ 2101 A + B Problem Too
- 水题 A Simple Task
- A simple puzzle game
- hdu 1000 A + B Problem
- A + B Problem (Big integer versi…
- A * B Problem (Big integer versi…
- poj 3468 A Simple…
- WDA: A simple tes…
- HDU 1339 A Simple Task
- 更新段 POJ-3468-A Simple Problem…
- HDOJ 1017 A Mathematical Cur…
- HDOJ 4245 A Famous Music Comp…
- 如何避免由于编译器差别带来…
- 一个常用定理表 - [武林秘籍…
- 树状数组 poj 2352 Stars
- 完整版 线段树
- 线段树和树状数组题目总结(未完)
- 线段树 hdu3468 A Simple Problem…
- 位运算 学习
- dll传递stl注意
- 大牛写的10种排序
- 一个大牛的博客,有空进去看看
- 线段树 I Hate It
- 运用位运算会比较简单 Binary Numb…
- 最小生成树 Jungle Roads
- 寒冰王座