题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6638 Problem Description There are n pirate chests buried in Byteland, labeled by 1,2,…,n. The i-th chest's location is (xi,yi) , and its value is wi , wi can be negative since the pirate can add some po…
原题链接 http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1809 Description Bobo has a balanced parenthesis sequence P=p1 p2…pn of length n and q questions. The i-th question is whether P remains balanced after pai and pbi swapped. Note that questions ar…
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending order. For the input seque…
Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16686 Accepted Submission(s): 10145 Problem Description The inversion number of a given number sequence a1, a2, ..., a…