답안 #507333

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
507333 2022-01-12T10:56:47 Z CSQ31 Exhibition (JOI19_ho_t2) C++17
0 / 100
1 ms 292 KB
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,m;
	cin>>n>>m;
	vector<array<int,2>>v(n);
	vector<int>c(m);
	for(int i=0;i<n;i++)cin>>v[i][1]>>v[i][0];
	for(int i=0;i<m;i++)cin>>c[i];
	sort(c.begin(),c.end());
	for(int i=0;i<n;i++)v[i][1] = m - (lower_bound(c.begin(),c.end(),v[i][1]) - c.begin());
	sort(v.begin(),v.end());
	int ans = 0;
	for(int i=n-1;i>=0;i--){
		if(ans+1 <= v[i][1])ans++;
	}
	cout<<ans;
	
	
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 292 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 292 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 292 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Incorrect 0 ms 204 KB Output isn't correct
4 Halted 0 ms 0 KB -