Submission #1027066

# Submission time Handle Problem Language Result Execution time Memory
1027066 2024-07-18T20:09:55 Z giorgi_pkhaladze Exhibition (JOI19_ho_t2) C++17
0 / 100
0 ms 452 KB
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define ff first
#define ss second
using namespace std;
const int N=2*1e5;
int n,m,k,i,j,ans;
vector<int> a;
vector<pii> p;
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL); cout.tie(NULL);
	cin>>n>>m;
	for(k=0; k<n; k++){
		int x,y;
		cin>>x>>y;
		p.pb({y,x});
	}
	for(k=0; k<m; k++){
		int x;
		cin>>x;
		a.pb(x);
	}
	sort(p.rbegin(),p.rend());
	sort(a.rbegin(),a.rend());
	ans=0;
	for(k=0; k<n; k++){
		if(p[k].ss<=a[k])ans++;
	}
	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 452 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 344 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 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 452 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 344 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 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 452 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Incorrect 0 ms 344 KB Output isn't correct
8 Halted 0 ms 0 KB -