# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1173578 | nguyenkhangninh99 | Exhibition (JOI19_ho_t2) | C++17 | 32 ms | 2632 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int maxn = 1e5 + 5;
struct l0301{
int s, v;
} buctranh[maxn];
bool cmp(l0301 x, l0301 y){
if(x.v == y.v) return x.s > y.s;
return (x.v > y.v);
}
int c[maxn];
void solve(){
int n, m; cin >> n >> m;
for(int i = 1; i <= n; i++) cin >> buctranh[i].s >> buctranh[i].v;
for(int i = 1; i <= m; i++) cin >> c[i];
sort(buctranh + 1, buctranh + n + 1, cmp);
sort(c + 1, c + m + 1, greater<int>());
int i = 1, j = 1, ans = 0;
while(i <= n && j <= m){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |