# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
540382 | 2022-03-20T08:45:25 Z | krit3379 | Exhibition (JOI19_ho_t2) | C++17 | 1 ms | 312 KB |
#include<bits/stdc++.h> using namespace std; #define N 200005 int c[N],ans; pair<int,int> a[N]; int main(){ int n,m,i,j; scanf("%d %d",&n,&m); for(i=1;i<=n;i++)scanf("%d %d",&a[i].second,&a[i].first); for(i=1;i<=m;i++)scanf("%d",&c[i]); sort(a+1,a+n+1,greater<pair<int,int>>()); sort(c+1,c+m+1,greater<int>()); for(i=1,j=1;i<=m;i++){ while(j<=n){ if(a[i].second<=c[i])break; else j++; } if(j<=n)j++,ans++; } printf("%d",ans); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Incorrect | 0 ms | 312 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Incorrect | 0 ms | 312 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Incorrect | 0 ms | 312 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |