#include <cstdio>
#include <queue>
using namespace std;
int n,k,buf;
priority_queue<int> pq;
queue<int> q;
int main()
{
freopen("input.txt","r",stdin);
scanf("%d%d",&n,&k);
for(int i=0;i<=k;++i) scanf("%d",&buf), pq.push(-buf);
for(;pq.size();){
printf("%d ",-pq.top()); pq.pop();
if(scanf("%d",&buf)==1) pq.push(-buf);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
2 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
3 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
4 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
5 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
6 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
7 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
2 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
3 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
4 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
5 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
6 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
7 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
8 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
9 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
10 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
2 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
3 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
4 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
5 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
6 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
7 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
8 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
9 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
10 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
11 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
12 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
13 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
14 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
15 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
2 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
3 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
4 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
5 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
6 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
7 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
8 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
9 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
10 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
11 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
12 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
13 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
14 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |
15 |
Runtime error |
0 ms |
1204 KB |
open (syscall #2) was called by the program (disallowed syscall) |