# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
128433 | 2019-07-10T22:44:50 Z | dragonslayerit | Exhibition (JOI19_ho_t2) | C++14 | 2 ms | 380 KB |
#include <cstdio> #include <algorithm> #include <tuple> struct Pic{ int s,v; void read(){ scanf("%d %d",&s,&v); } bool operator<(Pic p)const{ return std::tie(v,s)>std::tie(p.v,p.s); } }pics[100005]; int cs[100005]; int main(){ int N,M; scanf("%d %d",&N,&M); for(int i=0;i<N;i++){ pics[i].read(); } for(int i=0;i<M;i++){ scanf("%d",&cs[i]); } std::sort(pics,pics+N); std::sort(cs,cs+M,std::greater<int>()); int len=0; for(int i=0;i<N;i++){ if(len<M&&pics[i].s<=cs[i]){ len++; } } printf("%d\n",len); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 380 KB | Output is correct |
6 | Correct | 2 ms | 376 KB | Output is correct |
7 | Incorrect | 2 ms | 376 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 380 KB | Output is correct |
6 | Correct | 2 ms | 376 KB | Output is correct |
7 | Incorrect | 2 ms | 376 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 380 KB | Output is correct |
6 | Correct | 2 ms | 376 KB | Output is correct |
7 | Incorrect | 2 ms | 376 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |