Submission #111881

#TimeUsernameProblemLanguageResultExecution timeMemory
111881mechfrog88Meetings (IOI18_meetings)C++14
4 / 100
5600 ms1528 KiB
#include "meetings.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; vector<ll> minimum_costs(vector<int> h,vector<int> l,vector<int> r) { int n = l.size(); // ll a = h.size(); vector<ll> c(n); for (int z=0;z<n;z++){ ll left = l[z]; ll right = r[z]; c[z] = LLONG_MAX; for (int x=left;x<=right;x++){ ll temp = 0; ll maxi = 0; for (int y=x;y>=left;y--){ maxi = max(maxi,ll(h[y])); temp += maxi; } maxi = 0; for (int y=x+1;y<=right;y++){ maxi = max(maxi,ll(h[y])); temp += maxi; } c[z] = min(c[z],temp); } } return c; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...