# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1023887 | 2024-07-15T08:37:22 Z | lmaobruh | Exhibition (JOI19_ho_t2) | C++14 | 44 ms | 4532 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back const int N = 1e6+5; #define pii pair<int, int> #define fi first #define se second int n, m, c[N]; pii a[N]; void sol() { cin >> n >> m; for (int i = 1; i <= n; ++i) cin >> a[i].fi >> a[i].se; for (int i = 1; i <= m; ++i) cin >> c[i]; sort(c+1, c+m+1); sort(a+1, a+n+1, [&](pii &p1, pii &p2) -> bool { if (p1==p2) return 0; else if (p1.se == p2.se) return p1.fi < p2.fi; else return p1.se < p2.se; }); int j = m; for (int i = n; min(i, j) >= 1; --i) if (a[i].fi <= c[j]) j--; cout << m-j; } signed main() { cin.tie(0) -> sync_with_stdio(0); if (fopen("A.inp", "r")) freopen("A.inp", "r", stdin); int tc = 1; // cin >> tc; for (int test = 1; test <= tc; ++test) sol(); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 468 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 0 ms | 348 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 348 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 468 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 468 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 0 ms | 348 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 348 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 468 KB | Output is correct |
20 | Correct | 1 ms | 348 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 412 KB | Output is correct |
23 | Correct | 1 ms | 348 KB | Output is correct |
24 | Correct | 1 ms | 348 KB | Output is correct |
25 | Correct | 1 ms | 348 KB | Output is correct |
26 | Correct | 1 ms | 348 KB | Output is correct |
27 | Correct | 1 ms | 348 KB | Output is correct |
28 | Correct | 0 ms | 348 KB | Output is correct |
29 | Correct | 1 ms | 348 KB | Output is correct |
30 | Correct | 1 ms | 348 KB | Output is correct |
31 | Correct | 0 ms | 348 KB | Output is correct |
32 | Correct | 0 ms | 348 KB | Output is correct |
33 | Correct | 1 ms | 348 KB | Output is correct |
34 | Correct | 0 ms | 348 KB | Output is correct |
35 | Correct | 0 ms | 348 KB | Output is correct |
36 | Correct | 1 ms | 476 KB | Output is correct |
37 | Correct | 1 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 468 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 0 ms | 348 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 348 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 344 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 468 KB | Output is correct |
20 | Correct | 1 ms | 348 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 412 KB | Output is correct |
23 | Correct | 1 ms | 348 KB | Output is correct |
24 | Correct | 1 ms | 348 KB | Output is correct |
25 | Correct | 1 ms | 348 KB | Output is correct |
26 | Correct | 1 ms | 348 KB | Output is correct |
27 | Correct | 1 ms | 348 KB | Output is correct |
28 | Correct | 0 ms | 348 KB | Output is correct |
29 | Correct | 1 ms | 348 KB | Output is correct |
30 | Correct | 1 ms | 348 KB | Output is correct |
31 | Correct | 0 ms | 348 KB | Output is correct |
32 | Correct | 0 ms | 348 KB | Output is correct |
33 | Correct | 1 ms | 348 KB | Output is correct |
34 | Correct | 0 ms | 348 KB | Output is correct |
35 | Correct | 0 ms | 348 KB | Output is correct |
36 | Correct | 1 ms | 476 KB | Output is correct |
37 | Correct | 1 ms | 348 KB | Output is correct |
38 | Correct | 37 ms | 4432 KB | Output is correct |
39 | Correct | 31 ms | 4436 KB | Output is correct |
40 | Correct | 34 ms | 4440 KB | Output is correct |
41 | Correct | 44 ms | 4432 KB | Output is correct |
42 | Correct | 32 ms | 4432 KB | Output is correct |
43 | Correct | 32 ms | 4436 KB | Output is correct |
44 | Correct | 32 ms | 4436 KB | Output is correct |
45 | Correct | 32 ms | 4444 KB | Output is correct |
46 | Correct | 32 ms | 4432 KB | Output is correct |
47 | Correct | 29 ms | 3932 KB | Output is correct |
48 | Correct | 29 ms | 3920 KB | Output is correct |
49 | Correct | 26 ms | 3668 KB | Output is correct |
50 | Correct | 26 ms | 3672 KB | Output is correct |
51 | Correct | 34 ms | 4532 KB | Output is correct |
52 | Correct | 32 ms | 4444 KB | Output is correct |
53 | Correct | 32 ms | 4432 KB | Output is correct |
54 | Correct | 27 ms | 4348 KB | Output is correct |
55 | Correct | 33 ms | 4436 KB | Output is correct |
56 | Correct | 20 ms | 3164 KB | Output is correct |
57 | Correct | 12 ms | 1628 KB | Output is correct |
58 | Correct | 21 ms | 3032 KB | Output is correct |
59 | Correct | 20 ms | 3164 KB | Output is correct |
60 | Correct | 13 ms | 1832 KB | Output is correct |
61 | Correct | 19 ms | 2652 KB | Output is correct |
62 | Correct | 32 ms | 4432 KB | Output is correct |
63 | Correct | 33 ms | 4432 KB | Output is correct |
64 | Correct | 32 ms | 4444 KB | Output is correct |
65 | Correct | 33 ms | 4340 KB | Output is correct |
66 | Correct | 33 ms | 4520 KB | Output is correct |
67 | Correct | 34 ms | 4528 KB | Output is correct |
68 | Correct | 32 ms | 4444 KB | Output is correct |
69 | Correct | 33 ms | 4432 KB | Output is correct |
70 | Correct | 34 ms | 4444 KB | Output is correct |
71 | Correct | 32 ms | 4444 KB | Output is correct |
72 | Correct | 35 ms | 4444 KB | Output is correct |
73 | Correct | 35 ms | 4436 KB | Output is correct |