hdoj 5349 MZL's simple problem】的更多相关文章

题目传送门 /* 这题可以用stl的mutiset容器方便求解,我对这东西不熟悉,TLE了几次,最后用读入外挂水过. 题解有O(n)的做法,还以为我是侥幸过的,后来才知道iterator it写在循环内才超时了,囧! */ /************************************************ Author :Running_Time Created Time :2015-8-4 12:10:11 File Name :G.cpp ******************…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5349 #include<stdio.h> int main(){ int cnt; int max; int N; int ch; while(~scanf("%d",&N)){ cnt = ; while(N--){ scanf("%d",&ch); ){ scanf("%d",&ch); ) max = ch;…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5349 MZL's simple problem Description A simple problemProblem DescriptionYou have a multiple set,and now there are three kinds of operations:1 x : add number x to set2 : delete the minimum number (if the…
MZL's simple problem Time Limit: 3000/1500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 740    Accepted Submission(s): 357 Problem Description A simple problemProblem DescriptionYou have a multiple set,and now the…
树状数组.Easy. /* 4267 */ #include <iostream> #include <string> #include <map> #include <queue> #include <set> #include <stack> #include <vector> #include <deque> #include <algorithm> #include <cstdio&g…
A Simple Problem with Integers [题目链接]A Simple Problem with Integers [题目类型]线段树 成段增减+区间求和 &题解: 线段树 成段增减+区间求和 模板题 这种题真的应该理解并且可以流畅的独立码出来了 [时间复杂度]\(O(nlogn)\) &代码: #include <iostream> #include <cstdio> #include <cstring> using namespa…
题目链接: 传送门 A Simple Problem with Integers Time Limit: 5000MS     Memory Limit: 131072K Description 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 i…
A Simple Problem with Integers Time Limit: 5000MS   Memory Limit: 131072K Total Submissions: 58269   Accepted: 17753 Case Time Limit: 2000MS Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of…
A Simple Problem with Integers Time Limit:5000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu Description 给出了一个序列,你需要处理如下两种询问. "C a b c"表示给[a, b]区间中的值全部增加c (-10000 ≤ c ≤ 10000). "Q a b" 询问[a, b]区间中所有值的和. Input 第一行包含两个整数N, Q.1…
A Simple Problem with Integers Time Limit: 5000MS   Memory Limit: 131072K Total Submissions: 92127   Accepted: 28671 Case Time Limit: 2000MS 描述 You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operatio…