Submission #129369

# Submission time Handle Problem Language Result Execution time Memory
129369 2019-07-12T06:58:32 Z Dajunctic Exhibition (JOI19_ho_t2) C++17
100 / 100
245 ms 2812 KB
/*
 _   ________   ___       __ ___   _           _  _
| | / /|  _  \ / _ \     / // _ \ | |         | |(_)
| |/ / | | | |/ /_\ \   / // /_\ \| | __ __ _ | | _
|    \ | | | ||  _  |  / / |  _  || |/ // _` || || |
| |\  \| |/ / | | | | / /  | | | ||   <| (_| || || |
\_| \_/|___/  \_| |_//_/   \_| |_/|_|\_\\__,_||_||_|
*/
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5+50;
const int mod = 1e9+7;
#define size sdkdsf
#define pb push_back
const int in = 1e9+9;
typedef pair<int,int> ii;
int n, m;
struct Exhibition{
	int s, v;
} Pictures[N];
int size[N];
#define fi first
#define se second
signed main(){
	cin >> n >> m;
	for(int i=1;i<=n;i++){
		cin >> Pictures[i].s >> Pictures[i].v;
	}
	for(int i=1;i<=m;i++) cin >> size[i];
	sort(Pictures+1,Pictures+n+1,[](Exhibition _a,Exhibition _b){return _a.v > _b.v or (_a.v == _b.v and _a.s > _b.s);});
	sort(size+1,size+m+1,greater<int>());
	int it = 1;
	for(int i=1;i<=n;i++){
		if(it<=m and Pictures[i].s <= size[it]) it++;
	}
	cout << it-1;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 256 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 256 KB Output is correct
10 Correct 3 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 256 KB Output is correct
16 Correct 2 ms 376 KB Output is correct
17 Correct 3 ms 376 KB Output is correct
18 Correct 2 ms 376 KB Output is correct
19 Correct 2 ms 256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 256 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 256 KB Output is correct
10 Correct 3 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 256 KB Output is correct
16 Correct 2 ms 376 KB Output is correct
17 Correct 3 ms 376 KB Output is correct
18 Correct 2 ms 376 KB Output is correct
19 Correct 2 ms 256 KB Output is correct
20 Correct 4 ms 376 KB Output is correct
21 Correct 4 ms 380 KB Output is correct
22 Correct 4 ms 376 KB Output is correct
23 Correct 4 ms 376 KB Output is correct
24 Correct 4 ms 376 KB Output is correct
25 Correct 4 ms 376 KB Output is correct
26 Correct 4 ms 376 KB Output is correct
27 Correct 4 ms 376 KB Output is correct
28 Correct 5 ms 376 KB Output is correct
29 Correct 4 ms 376 KB Output is correct
30 Correct 4 ms 376 KB Output is correct
31 Correct 4 ms 380 KB Output is correct
32 Correct 3 ms 376 KB Output is correct
33 Correct 3 ms 376 KB Output is correct
34 Correct 4 ms 380 KB Output is correct
35 Correct 3 ms 376 KB Output is correct
36 Correct 4 ms 376 KB Output is correct
37 Correct 5 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 256 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 256 KB Output is correct
10 Correct 3 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 256 KB Output is correct
16 Correct 2 ms 376 KB Output is correct
17 Correct 3 ms 376 KB Output is correct
18 Correct 2 ms 376 KB Output is correct
19 Correct 2 ms 256 KB Output is correct
20 Correct 4 ms 376 KB Output is correct
21 Correct 4 ms 380 KB Output is correct
22 Correct 4 ms 376 KB Output is correct
23 Correct 4 ms 376 KB Output is correct
24 Correct 4 ms 376 KB Output is correct
25 Correct 4 ms 376 KB Output is correct
26 Correct 4 ms 376 KB Output is correct
27 Correct 4 ms 376 KB Output is correct
28 Correct 5 ms 376 KB Output is correct
29 Correct 4 ms 376 KB Output is correct
30 Correct 4 ms 376 KB Output is correct
31 Correct 4 ms 380 KB Output is correct
32 Correct 3 ms 376 KB Output is correct
33 Correct 3 ms 376 KB Output is correct
34 Correct 4 ms 380 KB Output is correct
35 Correct 3 ms 376 KB Output is correct
36 Correct 4 ms 376 KB Output is correct
37 Correct 5 ms 376 KB Output is correct
38 Correct 235 ms 2656 KB Output is correct
39 Correct 232 ms 2808 KB Output is correct
40 Correct 227 ms 2680 KB Output is correct
41 Correct 237 ms 2812 KB Output is correct
42 Correct 235 ms 2692 KB Output is correct
43 Correct 237 ms 2620 KB Output is correct
44 Correct 238 ms 2640 KB Output is correct
45 Correct 239 ms 2680 KB Output is correct
46 Correct 231 ms 2688 KB Output is correct
47 Correct 213 ms 2680 KB Output is correct
48 Correct 210 ms 2444 KB Output is correct
49 Correct 201 ms 2344 KB Output is correct
50 Correct 192 ms 2268 KB Output is correct
51 Correct 245 ms 2680 KB Output is correct
52 Correct 241 ms 2780 KB Output is correct
53 Correct 234 ms 2680 KB Output is correct
54 Correct 233 ms 2700 KB Output is correct
55 Correct 235 ms 2680 KB Output is correct
56 Correct 157 ms 1868 KB Output is correct
57 Correct 86 ms 1300 KB Output is correct
58 Correct 154 ms 1912 KB Output is correct
59 Correct 158 ms 1912 KB Output is correct
60 Correct 91 ms 1252 KB Output is correct
61 Correct 137 ms 1604 KB Output is correct
62 Correct 238 ms 2680 KB Output is correct
63 Correct 240 ms 2680 KB Output is correct
64 Correct 237 ms 2652 KB Output is correct
65 Correct 238 ms 2680 KB Output is correct
66 Correct 237 ms 2652 KB Output is correct
67 Correct 237 ms 2652 KB Output is correct
68 Correct 238 ms 2652 KB Output is correct
69 Correct 241 ms 2756 KB Output is correct
70 Correct 240 ms 2808 KB Output is correct
71 Correct 238 ms 2808 KB Output is correct
72 Correct 242 ms 2724 KB Output is correct
73 Correct 237 ms 2680 KB Output is correct