# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
924137 | 2024-02-08T14:13:51 Z | pan | Exhibition (JOI19_ho_t2) | C++17 | 50 ms | 5840 KB |
#include <bits/stdc++.h> //#include "bits_stdc++.h" #include <stdio.h> #include <algorithm> #include <memory.h> #define f first #define s second #define pb push_back #define mp make_pair #define lb lower_bound #define ub upper_bound #define input(x) scanf("%lld", &x); #define print(x, y) printf("%lld%c", x, y); #define show(x) cerr << #x << " is " << x << endl; #define show2(x,y) cerr << #x << " is " << x << " " << #y << " is " << y << endl; #define show3(x,y,z) cerr << #x << " is " << x << " " << #y << " is " << y << " " << #z << " is " << z << endl; #define discretize(x) sort(x.begin(), x.end()); x.erase(unique(x.begin(), x.end()), x.end()); using namespace std; typedef long long ll; typedef long double ld; typedef pair<ld, ll> pd; typedef pair<string, ll> psl; typedef pair<ll, ll> pi; typedef pair<ll, pi> pii; int main() { ll n, m; input(n); input(m); vector<pi> pictures(n); vector<ll> frames(m); for (ll i=0; i<n; ++i) {input(pictures[i].s); input(pictures[i].f);} for (ll i=0; i<m; ++i) {input(frames[i]);} sort(pictures.begin(), pictures.end(), greater<pi>()); sort(frames.begin(), frames.end(), greater<ll>()); ll p = 0; ll i = 0; for (;i<m; ++i) { while (p<n && pictures[p].s>frames[i]) p++; if (p==n) break; p++; } print(i, '\n'); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 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 | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 1 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 | 600 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 344 KB | Output is correct |
19 | Correct | 1 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 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 | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 1 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 | 600 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 344 KB | Output is correct |
19 | Correct | 1 ms | 348 KB | Output is correct |
20 | Correct | 1 ms | 348 KB | Output is correct |
21 | Correct | 1 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 444 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 | 1 ms | 348 KB | Output is correct |
29 | Correct | 1 ms | 424 KB | Output is correct |
30 | Correct | 1 ms | 348 KB | Output is correct |
31 | Correct | 1 ms | 348 KB | Output is correct |
32 | Correct | 1 ms | 348 KB | Output is correct |
33 | Correct | 0 ms | 348 KB | Output is correct |
34 | Correct | 1 ms | 348 KB | Output is correct |
35 | Correct | 0 ms | 348 KB | Output is correct |
36 | Correct | 1 ms | 348 KB | Output is correct |
37 | Correct | 1 ms | 484 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 1 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 | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 1 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 | 600 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 344 KB | Output is correct |
19 | Correct | 1 ms | 348 KB | Output is correct |
20 | Correct | 1 ms | 348 KB | Output is correct |
21 | Correct | 1 ms | 348 KB | Output is correct |
22 | Correct | 1 ms | 444 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 | 1 ms | 348 KB | Output is correct |
29 | Correct | 1 ms | 424 KB | Output is correct |
30 | Correct | 1 ms | 348 KB | Output is correct |
31 | Correct | 1 ms | 348 KB | Output is correct |
32 | Correct | 1 ms | 348 KB | Output is correct |
33 | Correct | 0 ms | 348 KB | Output is correct |
34 | Correct | 1 ms | 348 KB | Output is correct |
35 | Correct | 0 ms | 348 KB | Output is correct |
36 | Correct | 1 ms | 348 KB | Output is correct |
37 | Correct | 1 ms | 484 KB | Output is correct |
38 | Correct | 38 ms | 5456 KB | Output is correct |
39 | Correct | 37 ms | 5456 KB | Output is correct |
40 | Correct | 38 ms | 5724 KB | Output is correct |
41 | Correct | 40 ms | 5452 KB | Output is correct |
42 | Correct | 39 ms | 5468 KB | Output is correct |
43 | Correct | 40 ms | 5680 KB | Output is correct |
44 | Correct | 44 ms | 5680 KB | Output is correct |
45 | Correct | 43 ms | 5660 KB | Output is correct |
46 | Correct | 38 ms | 5468 KB | Output is correct |
47 | Correct | 35 ms | 5096 KB | Output is correct |
48 | Correct | 34 ms | 4956 KB | Output is correct |
49 | Correct | 31 ms | 4616 KB | Output is correct |
50 | Correct | 31 ms | 4444 KB | Output is correct |
51 | Correct | 40 ms | 5468 KB | Output is correct |
52 | Correct | 39 ms | 5624 KB | Output is correct |
53 | Correct | 39 ms | 5468 KB | Output is correct |
54 | Correct | 37 ms | 5468 KB | Output is correct |
55 | Correct | 46 ms | 5696 KB | Output is correct |
56 | Correct | 24 ms | 3912 KB | Output is correct |
57 | Correct | 15 ms | 2140 KB | Output is correct |
58 | Correct | 24 ms | 3928 KB | Output is correct |
59 | Correct | 24 ms | 3920 KB | Output is correct |
60 | Correct | 15 ms | 2140 KB | Output is correct |
61 | Correct | 24 ms | 3164 KB | Output is correct |
62 | Correct | 48 ms | 5452 KB | Output is correct |
63 | Correct | 39 ms | 5460 KB | Output is correct |
64 | Correct | 42 ms | 5784 KB | Output is correct |
65 | Correct | 39 ms | 5584 KB | Output is correct |
66 | Correct | 39 ms | 5452 KB | Output is correct |
67 | Correct | 39 ms | 5584 KB | Output is correct |
68 | Correct | 39 ms | 5456 KB | Output is correct |
69 | Correct | 44 ms | 5468 KB | Output is correct |
70 | Correct | 41 ms | 5596 KB | Output is correct |
71 | Correct | 50 ms | 5840 KB | Output is correct |
72 | Correct | 40 ms | 5688 KB | Output is correct |
73 | Correct | 39 ms | 5456 KB | Output is correct |