优先队列模拟一下就好. #include<bits/stdc++.h> using namespace std; priority_queue<int>q; int main() { int n; scanf("%d",&n); int t; scanf("%d",&t); ; i <= n; i++){ int v; scanf("%d",&v); q.push(v); } ; while(…
Counterfeit Dollar Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 35774 Accepted: 11390 Description Sally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit ev…
P2 : Heshen's Account Book Time Limit:1000ms Case Time Limit:1000ms Memory Limit:512MB Description Heshen was an official of the Qing dynasty. He made a fortune which could be comparable to a whole country's wealth by corruption. So he was known as t…
How many prime numbers Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12955 Accepted Submission(s): 4490 Problem Description Give you a lot of positive integers, just to find out how many…
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 85149 Accepted: 36857 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land,…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049 Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…