# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
152299 | 2019-09-07T08:22:57 Z | arnold518 | Sushi (JOI16_sushi) | C++14 | 118 ms | 8356 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int MAXN = 400000; const int MAXQ = 25000; int N, Q, A[MAXN+10], S, T, P; int main() { int i, j; scanf("%d%d", &N, &Q); priority_queue<int> PQ; for(i=1; i<=N; i++) scanf("%d", &A[i]), PQ.push(A[i]); while(Q--) { scanf("%d%d%d", &S, &T, &P); PQ.push(P); printf("%d\n", PQ.top()); PQ.pop(); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 504 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 107 ms | 8148 KB | Output is correct |
2 | Correct | 92 ms | 6984 KB | Output is correct |
3 | Correct | 57 ms | 4708 KB | Output is correct |
4 | Correct | 116 ms | 8292 KB | Output is correct |
5 | Correct | 91 ms | 8176 KB | Output is correct |
6 | Correct | 94 ms | 8248 KB | Output is correct |
7 | Correct | 94 ms | 8236 KB | Output is correct |
8 | Correct | 92 ms | 8164 KB | Output is correct |
9 | Correct | 54 ms | 4712 KB | Output is correct |
10 | Correct | 81 ms | 6756 KB | Output is correct |
11 | Correct | 55 ms | 4708 KB | Output is correct |
12 | Correct | 84 ms | 6784 KB | Output is correct |
13 | Correct | 118 ms | 8136 KB | Output is correct |
14 | Correct | 95 ms | 6884 KB | Output is correct |
15 | Correct | 57 ms | 4708 KB | Output is correct |
16 | Correct | 108 ms | 8236 KB | Output is correct |
17 | Correct | 91 ms | 8356 KB | Output is correct |
18 | Correct | 94 ms | 8164 KB | Output is correct |
19 | Correct | 97 ms | 8292 KB | Output is correct |
20 | Correct | 92 ms | 8164 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 504 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |