# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
507333 |
2022-01-12T10:56:47 Z |
CSQ31 |
Exhibition (JOI19_ho_t2) |
C++17 |
|
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;
}
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |
# |
Verdict |
Execution time |
Memory |
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 |
- |