Problem Description You are given an array a1,a2,...,an(∀i∈[1,n],1≤ai≤n). Initially, each element of the array is **unique**.Moreover, there are m instructions.Each instruction is in one of the following two formats:1. (1,pos),indicating to change th…
Petya and Array http://codeforces.com/problemset/problem/1042/D time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya has an array aa consisting of nn integers. He has learned partial sums…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6464 免费送气球 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 264 Accepted Submission(s): 53 Problem Description 又到了GDUT一年一度的程序设计竞赛校赛的时间啦.同学们只要参加校赛,…
最近在线段树的世界里遨游,什么都能用线段树做,这不又一道权值线段树了么. ZYB's Premutation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1029 Accepted Submission(s): 528 Problem Description ZYB has a premutation P ,but he o…