# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
991612 |
2024-06-02T16:39:50 Z |
Malix |
Exhibition (JOI19_ho_t2) |
C++14 |
|
92 ms |
4520 KB |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef pair<int,int> pi;
typedef vector<pi> pii;
#define REP(i,a,b) for(int i=a;i<b;i++)
#define F first
#define S second
#define PB push_back
#define MP make_pair
ll INF=1e18+10;
ll M=1e9+7;
int main() {
//ios::sync_with_stdio(0);
//cin.tie(0);
//freopen("test_input.txt", "r", stdin);
//freopen("test_output.txt", "w", stdout);
int n,m;cin>>n>>m;
pii a(n);
REP(i,0,n)cin>>a[i].S>>a[i].F;
sort(a.begin(),a.end());
vi c(m);
REP(i,0,m)cin>>c[i];
sort(c.begin(),c.end());
int ans=0;n--;
while(m--){
while(n>=0&&a[n].S>c[m])n--;
if(n>=0){
ans++;
n--;
}
}
cout<<ans;
}
# |
Verdict |
Execution time |
Memory |
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 |
348 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 |
344 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 |
436 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
348 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 |
344 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 |
436 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 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 |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
468 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
448 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
2 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 |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
348 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 |
344 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 |
436 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 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 |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
468 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
2 ms |
448 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
468 KB |
Output is correct |
28 |
Correct |
2 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 |
1 ms |
348 KB |
Output is correct |
32 |
Correct |
1 ms |
348 KB |
Output is correct |
33 |
Correct |
1 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
82 ms |
4264 KB |
Output is correct |
39 |
Correct |
92 ms |
4436 KB |
Output is correct |
40 |
Correct |
78 ms |
4404 KB |
Output is correct |
41 |
Correct |
84 ms |
4436 KB |
Output is correct |
42 |
Correct |
87 ms |
4436 KB |
Output is correct |
43 |
Correct |
83 ms |
4392 KB |
Output is correct |
44 |
Correct |
88 ms |
4276 KB |
Output is correct |
45 |
Correct |
86 ms |
4436 KB |
Output is correct |
46 |
Correct |
85 ms |
4436 KB |
Output is correct |
47 |
Correct |
74 ms |
4024 KB |
Output is correct |
48 |
Correct |
77 ms |
3924 KB |
Output is correct |
49 |
Correct |
74 ms |
3648 KB |
Output is correct |
50 |
Correct |
69 ms |
3652 KB |
Output is correct |
51 |
Correct |
83 ms |
4516 KB |
Output is correct |
52 |
Correct |
84 ms |
4408 KB |
Output is correct |
53 |
Correct |
87 ms |
4436 KB |
Output is correct |
54 |
Correct |
81 ms |
4520 KB |
Output is correct |
55 |
Correct |
84 ms |
4436 KB |
Output is correct |
56 |
Correct |
53 ms |
2896 KB |
Output is correct |
57 |
Correct |
30 ms |
1628 KB |
Output is correct |
58 |
Correct |
53 ms |
3144 KB |
Output is correct |
59 |
Correct |
54 ms |
3156 KB |
Output is correct |
60 |
Correct |
31 ms |
1628 KB |
Output is correct |
61 |
Correct |
48 ms |
2652 KB |
Output is correct |
62 |
Correct |
82 ms |
4260 KB |
Output is correct |
63 |
Correct |
84 ms |
4388 KB |
Output is correct |
64 |
Correct |
86 ms |
4436 KB |
Output is correct |
65 |
Correct |
87 ms |
4436 KB |
Output is correct |
66 |
Correct |
85 ms |
4404 KB |
Output is correct |
67 |
Correct |
82 ms |
4436 KB |
Output is correct |
68 |
Correct |
82 ms |
4436 KB |
Output is correct |
69 |
Correct |
85 ms |
4436 KB |
Output is correct |
70 |
Correct |
84 ms |
4436 KB |
Output is correct |
71 |
Correct |
82 ms |
4436 KB |
Output is correct |
72 |
Correct |
84 ms |
4436 KB |
Output is correct |
73 |
Correct |
85 ms |
4276 KB |
Output is correct |