Submission #1027445

# Submission time Handle Problem Language Result Execution time Memory
1027445 2024-07-19T06:31:36 Z 변재우(#10954) Sushi (JOI16_sushi) C++17
15 / 100
201 ms 22036 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;

int N, Q;
multiset<int> S;

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    cin>>N>>Q;
    for(int i=1; i<=N; i++) {
        int x; cin>>x;
        S.insert(x);
    }
    while(Q--) {
        int l, r, x; cin>>l>>r>>x;
        S.insert(x);
        cout<<(*prev(S.end()))<<"\n", S.erase(prev(S.end()));
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 183 ms 21832 KB Output is correct
2 Correct 188 ms 21072 KB Output is correct
3 Correct 71 ms 19792 KB Output is correct
4 Correct 183 ms 21840 KB Output is correct
5 Correct 112 ms 22036 KB Output is correct
6 Correct 96 ms 21936 KB Output is correct
7 Correct 85 ms 21840 KB Output is correct
8 Correct 109 ms 21844 KB Output is correct
9 Correct 108 ms 19792 KB Output is correct
10 Correct 106 ms 21072 KB Output is correct
11 Correct 92 ms 19912 KB Output is correct
12 Correct 107 ms 21008 KB Output is correct
13 Correct 201 ms 21780 KB Output is correct
14 Correct 199 ms 21136 KB Output is correct
15 Correct 78 ms 20020 KB Output is correct
16 Correct 182 ms 21892 KB Output is correct
17 Correct 109 ms 21844 KB Output is correct
18 Correct 94 ms 22032 KB Output is correct
19 Correct 87 ms 21844 KB Output is correct
20 Correct 138 ms 21844 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -