# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
298783 | Pichon5 | Meetings (IOI18_meetings) | C++17 | 5575 ms | 1656 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 "meetings.h"
#include <bits/stdc++.h>
using namespace std;
long long max(long long x, long long y){
if(x>y){
return x;
}
return y;
}
vector<long long> minimum_costs(vector<int> H,vector<int> L,vector<int> R) {
vector<long long>v;
for(int i=0;i<L.size();i++){
long long sum=1000000000000000;
for(int l=L[i];l<=R[i];l++){
long long ma=0;
long long res=0;
for(int ii=l;ii<=R[i];ii++){
ma=max(ma,H[ii]);
res+=ma;
}
ma=0;
for(int ii=l-1;ii>=L[i];ii--){
ma=max(ma,H[ii]);
res+=ma;
}
sum=min(sum,res);
}
v.push_back(sum);
}
return v;
}
Compilation message (stderr)
# | 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... |