随笔分类 - 树状数组
摘要:Cows Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 24787 Accepted: 8296 Description Farmer John's cows have discovered that the clover gr
阅读全文
摘要:1 #include <bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 int n,m; 5 const int N=100005; 6 ll cnt[N],arr[N],brr[N]; 7 vector<ll> vec;
阅读全文
摘要:P1908 逆序对 提交 69.25k 通过 22.37k 时间限制 1.00s 内存限制 125.00MB 提交代码 加入收藏 P1908 逆序对 提交 69.25k 通过 22.37k 时间限制 1.00s 内存限制 125.00MB 提交代码 加入收藏 P1908 逆序对 提交 69.25k
阅读全文
摘要:You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number
阅读全文
摘要:1878: [SDOI2009]HH的项链 Description HH有一串由各种漂亮的贝壳组成的项链。HH相信不同的贝壳会带来好运,所以每次散步 完后,他都会随意取出一 段贝壳,思考它们所表达的含义。HH不断地收集新的贝壳,因此他的项链变得越来越长。有一天,他突然提出了一 个问题:某一段贝壳中,
阅读全文
摘要:Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 59608 Accepted: 25426 Description Astronomers often examine star maps where stars are
阅读全文
摘要:Chika and Friendly Pairs Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 1164 Accepted Submissi
阅读全文
摘要:描述 给定n个数据,有两个操作,加减其中的一个数据,当然还可查询在某段数据的和。 给定n个数据,有两个操作,加减其中的一个数据,当然还可查询在某段数据的和。 输入 输入数据有多组,每组数据的第一行输入n,1=<n<=500000,代表数据的个数。第二行输入具体数据,数据为正整数,范围在1到10000
阅读全文