Submission #210782

#TimeUsernameProblemLanguageResultExecution timeMemory
210782ToMmyDongJob Scheduling (IOI19_job)C++14
5 / 100
115 ms5148 KiB
#include <bits/stdc++.h> typedef long long ll; long long scheduling_cost(std::vector<int> p, std::vector<int> u, std::vector<int> d) { int n = p.size(); assert(p.size() == n); assert(u.size() == n); assert(d.size() == n); ll ans = 0, sum = 0; for (int i=0; i<n; i++) { sum += d[i]; ans += sum * u[i]; } return ans; }

Compilation message (stderr)

In file included from /usr/include/c++/7/cassert:44:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
                 from job.cpp:1:
job.cpp: In function 'long long int scheduling_cost(std::vector<int>, std::vector<int>, std::vector<int>)':
job.cpp:7:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     assert(p.size() == n);
            ~~~~~~~~~^~~~
job.cpp:8:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     assert(u.size() == n);
            ~~~~~~~~~^~~~
job.cpp:9:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     assert(d.size() == n);
            ~~~~~~~~~^~~~
#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...