Sort Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4673 Accepted Submission(s): 1177 Problem Description Recently, Bob has just learnt a naive sorting algorithm: merge sort. Now, Bob receiv
Sort Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2377 Accepted Submission(s): 610 Problem Description Recently, Bob has just learnt a naive sorting algorithm: merge sort. Now, Bob receiv
用到优先队列 #include<iostream> #include<string> #include<algorithm> #include<cstdio> #include<vector> #include<queue> #define N 1000005 using namespace std; struct Node { int r,l,id; bool operator <(Node a) const{return l
The kth great number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 10390 Accepted Submission(s): 4153 Problem Description Xiao Ming and Xiao Bao are playing a simple Numbers game. In a roun
题目:这里 题意: 两个类似于栈的列表,栈a和栈b,n个操作,push a x表示把数x放进a栈的栈底,pop b 表示将栈b的栈顶元素取出输出,并释放这个栈顶元素,merge a b表示把后面的那个 栈里的元素全部压进前面的那个栈里面,并且压入后前面的栈的所有元素按其进栈顺序排列然后后面的栈变为了空. push和pop操作都还好,就是优先队列或者栈的操作,主要是merge操作,如果啊按照题目来模拟每次将后面的栈元素取出放入前面的栈,可能会超时,而超时的主要因素是每次都将 元素多的栈压入了元素少
Continuous Same Game (1) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 410 Accepted Submission(s): 143 Problem Description Continuous Same Game is a simple game played on a grid of colored
Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17171 Accepted Submission(s): 5495Special Judge Problem Description The Princess has been abducted by the BEelzebub