# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1099956 | ttamx | Nile (IOI24_nile) | C++17 | 77 ms | 12836 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF=2e9;
vector<ll> calculate_costs(vector<int> w,vector<int> a,vector<int> b,vector<int> qr){
int n=w.size();
int q=qr.size();
vector<int> ord(n);
iota(ord.begin(),ord.end(),0);
sort(ord.begin(),ord.end(),[&](int i,int j){
return w[i]<w[j];
});
auto work=[&](vector<int> &a){
vector<int> res(n);
for(int i=0;i<n;i++){
res[i]=a[ord[i]];
}
swap(a,res);
};
work(w);
work(a);
work(b);
vector<ll> ans(q);
vector<int> ord2(q);
iota(ord2.begin(),ord2.end(),0);
sort(ord2.begin(),ord2.end(),[&](int i,int j){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |