Submission #768123

# Submission time Handle Problem Language Result Execution time Memory
768123 2023-06-27T13:31:54 Z LinkedArray Exhibition (JOI19_ho_t2) C++17
0 / 100
1 ms 212 KB
#include <bits/stdc++.h>
using namespace std;
 
int main(){
	int n, m;
	cin>>n>>m;
 
	vector<pair<int, int>> picture(n);
	vector<int> frame(m);
	
	for(auto &[a, b] : picture){
	    cin >> a >> b;
	}
	for(auto &a : frame){
	    cin >> a; 
	}
 
	sort(picture.begin(), picture.end()); 
	sort(frame.begin(), frame.end());
	
	int ans = 0, j = m-1;
	int i = n - 1;
	
	while(i >= 0){
		if(picture[i].first <= frame[j]){
		    ++ans;
		    j--;
		}
		i--;
	}
	cout << ans << endl;
  
  return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Incorrect 0 ms 212 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Incorrect 0 ms 212 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Incorrect 0 ms 212 KB Output isn't correct
6 Halted 0 ms 0 KB -