# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
129367 |
2019-07-12T06:53:43 Z |
Latina |
Exhibition (JOI19_ho_t2) |
C++14 |
|
67 ms |
1908 KB |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, M; cin >> N >> M;
vector<pair<int, int> > pics;
for (int i = 0; i < N; i++) {
int S, V; cin >> S >> V;
pics.push_back({V,S});
}
sort(pics.begin(), pics.end());
vector<int> C(M);
for (int i = 0; i < M; i++) cin >> C[i];
sort(C.begin(), C.end());
int ans = 0;
for (int i = N-1; i >= 0 && ans < M; i--) if (C[M-ans-1] >= pics[i].second) ans++;
cout << ans << '\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Correct |
2 ms |
376 KB |
Output is correct |
5 |
Correct |
2 ms |
376 KB |
Output is correct |
6 |
Correct |
3 ms |
376 KB |
Output is correct |
7 |
Correct |
2 ms |
376 KB |
Output is correct |
8 |
Correct |
2 ms |
376 KB |
Output is correct |
9 |
Correct |
2 ms |
376 KB |
Output is correct |
10 |
Correct |
2 ms |
376 KB |
Output is correct |
11 |
Correct |
2 ms |
376 KB |
Output is correct |
12 |
Correct |
2 ms |
376 KB |
Output is correct |
13 |
Correct |
2 ms |
376 KB |
Output is correct |
14 |
Correct |
2 ms |
376 KB |
Output is correct |
15 |
Correct |
2 ms |
376 KB |
Output is correct |
16 |
Correct |
2 ms |
376 KB |
Output is correct |
17 |
Correct |
2 ms |
376 KB |
Output is correct |
18 |
Correct |
2 ms |
376 KB |
Output is correct |
19 |
Correct |
2 ms |
376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Correct |
2 ms |
376 KB |
Output is correct |
5 |
Correct |
2 ms |
376 KB |
Output is correct |
6 |
Correct |
3 ms |
376 KB |
Output is correct |
7 |
Correct |
2 ms |
376 KB |
Output is correct |
8 |
Correct |
2 ms |
376 KB |
Output is correct |
9 |
Correct |
2 ms |
376 KB |
Output is correct |
10 |
Correct |
2 ms |
376 KB |
Output is correct |
11 |
Correct |
2 ms |
376 KB |
Output is correct |
12 |
Correct |
2 ms |
376 KB |
Output is correct |
13 |
Correct |
2 ms |
376 KB |
Output is correct |
14 |
Correct |
2 ms |
376 KB |
Output is correct |
15 |
Correct |
2 ms |
376 KB |
Output is correct |
16 |
Correct |
2 ms |
376 KB |
Output is correct |
17 |
Correct |
2 ms |
376 KB |
Output is correct |
18 |
Correct |
2 ms |
376 KB |
Output is correct |
19 |
Correct |
2 ms |
376 KB |
Output is correct |
20 |
Correct |
3 ms |
376 KB |
Output is correct |
21 |
Correct |
2 ms |
376 KB |
Output is correct |
22 |
Correct |
2 ms |
376 KB |
Output is correct |
23 |
Correct |
3 ms |
376 KB |
Output is correct |
24 |
Correct |
3 ms |
376 KB |
Output is correct |
25 |
Correct |
3 ms |
376 KB |
Output is correct |
26 |
Correct |
3 ms |
380 KB |
Output is correct |
27 |
Correct |
3 ms |
376 KB |
Output is correct |
28 |
Correct |
3 ms |
372 KB |
Output is correct |
29 |
Correct |
3 ms |
376 KB |
Output is correct |
30 |
Correct |
3 ms |
380 KB |
Output is correct |
31 |
Correct |
3 ms |
376 KB |
Output is correct |
32 |
Correct |
2 ms |
376 KB |
Output is correct |
33 |
Correct |
2 ms |
508 KB |
Output is correct |
34 |
Correct |
3 ms |
504 KB |
Output is correct |
35 |
Correct |
2 ms |
376 KB |
Output is correct |
36 |
Correct |
3 ms |
376 KB |
Output is correct |
37 |
Correct |
3 ms |
376 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Correct |
2 ms |
376 KB |
Output is correct |
5 |
Correct |
2 ms |
376 KB |
Output is correct |
6 |
Correct |
3 ms |
376 KB |
Output is correct |
7 |
Correct |
2 ms |
376 KB |
Output is correct |
8 |
Correct |
2 ms |
376 KB |
Output is correct |
9 |
Correct |
2 ms |
376 KB |
Output is correct |
10 |
Correct |
2 ms |
376 KB |
Output is correct |
11 |
Correct |
2 ms |
376 KB |
Output is correct |
12 |
Correct |
2 ms |
376 KB |
Output is correct |
13 |
Correct |
2 ms |
376 KB |
Output is correct |
14 |
Correct |
2 ms |
376 KB |
Output is correct |
15 |
Correct |
2 ms |
376 KB |
Output is correct |
16 |
Correct |
2 ms |
376 KB |
Output is correct |
17 |
Correct |
2 ms |
376 KB |
Output is correct |
18 |
Correct |
2 ms |
376 KB |
Output is correct |
19 |
Correct |
2 ms |
376 KB |
Output is correct |
20 |
Correct |
3 ms |
376 KB |
Output is correct |
21 |
Correct |
2 ms |
376 KB |
Output is correct |
22 |
Correct |
2 ms |
376 KB |
Output is correct |
23 |
Correct |
3 ms |
376 KB |
Output is correct |
24 |
Correct |
3 ms |
376 KB |
Output is correct |
25 |
Correct |
3 ms |
376 KB |
Output is correct |
26 |
Correct |
3 ms |
380 KB |
Output is correct |
27 |
Correct |
3 ms |
376 KB |
Output is correct |
28 |
Correct |
3 ms |
372 KB |
Output is correct |
29 |
Correct |
3 ms |
376 KB |
Output is correct |
30 |
Correct |
3 ms |
380 KB |
Output is correct |
31 |
Correct |
3 ms |
376 KB |
Output is correct |
32 |
Correct |
2 ms |
376 KB |
Output is correct |
33 |
Correct |
2 ms |
508 KB |
Output is correct |
34 |
Correct |
3 ms |
504 KB |
Output is correct |
35 |
Correct |
2 ms |
376 KB |
Output is correct |
36 |
Correct |
3 ms |
376 KB |
Output is correct |
37 |
Correct |
3 ms |
376 KB |
Output is correct |
38 |
Correct |
64 ms |
1800 KB |
Output is correct |
39 |
Correct |
62 ms |
1776 KB |
Output is correct |
40 |
Correct |
57 ms |
1840 KB |
Output is correct |
41 |
Correct |
64 ms |
1780 KB |
Output is correct |
42 |
Correct |
63 ms |
1904 KB |
Output is correct |
43 |
Correct |
65 ms |
1780 KB |
Output is correct |
44 |
Correct |
64 ms |
1780 KB |
Output is correct |
45 |
Correct |
64 ms |
1780 KB |
Output is correct |
46 |
Correct |
63 ms |
1900 KB |
Output is correct |
47 |
Correct |
65 ms |
1780 KB |
Output is correct |
48 |
Correct |
63 ms |
1780 KB |
Output is correct |
49 |
Correct |
56 ms |
1780 KB |
Output is correct |
50 |
Correct |
54 ms |
1908 KB |
Output is correct |
51 |
Correct |
63 ms |
1780 KB |
Output is correct |
52 |
Correct |
64 ms |
1780 KB |
Output is correct |
53 |
Correct |
63 ms |
1780 KB |
Output is correct |
54 |
Correct |
57 ms |
1908 KB |
Output is correct |
55 |
Correct |
64 ms |
1780 KB |
Output is correct |
56 |
Correct |
41 ms |
1776 KB |
Output is correct |
57 |
Correct |
24 ms |
1016 KB |
Output is correct |
58 |
Correct |
41 ms |
1780 KB |
Output is correct |
59 |
Correct |
41 ms |
1696 KB |
Output is correct |
60 |
Correct |
25 ms |
1032 KB |
Output is correct |
61 |
Correct |
43 ms |
1540 KB |
Output is correct |
62 |
Correct |
64 ms |
1904 KB |
Output is correct |
63 |
Correct |
64 ms |
1780 KB |
Output is correct |
64 |
Correct |
67 ms |
1900 KB |
Output is correct |
65 |
Correct |
64 ms |
1780 KB |
Output is correct |
66 |
Correct |
63 ms |
1780 KB |
Output is correct |
67 |
Correct |
63 ms |
1780 KB |
Output is correct |
68 |
Correct |
65 ms |
1780 KB |
Output is correct |
69 |
Correct |
65 ms |
1832 KB |
Output is correct |
70 |
Correct |
65 ms |
1752 KB |
Output is correct |
71 |
Correct |
62 ms |
1780 KB |
Output is correct |
72 |
Correct |
66 ms |
1780 KB |
Output is correct |
73 |
Correct |
61 ms |
1780 KB |
Output is correct |