Submission #991944

#TimeUsernameProblemLanguageResultExecution timeMemory
991944UnforgettableplJob Scheduling (IOI19_job)C++17
19 / 100
74 ms17608 KiB
#include <bits/stdc++.h> using namespace std; // #define int long long long long scheduling_cost(std::vector<int> p, std::vector<int> u, std::vector<int> d) { int n = p.size(); long long ans=u[0]*d[0]; vector<pair<long double,int>> vec; for(int i=1;i<n;i++)vec.emplace_back((long double)(d[i])/(long double)(u[i]),i); sort(vec.begin(),vec.end()); long long currtime = d[0]; for(auto[a,b]:vec){ currtime+=d[b]; ans+=currtime*u[b]; } return ans; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...