Submission #737302

#TimeUsernameProblemLanguageResultExecution timeMemory
737302keisuke6Road Closures (APIO21_roads)C++14
5 / 100
47 ms5764 KiB
#include "roads.h" #include <vector> #include <algorithm> using namespace std; std::vector<long long> minimum_closure_costs(int N, std::vector<int> U, std::vector<int> V, std::vector<int> W) { sort(W.begin(),W.end()); vector<long long> A = {0}; long long now = 0; for(int i=0;i<W.size();i++){ now += W[i]; A.push_back(now); } reverse(A.begin(),A.end()); return A; }

Compilation message (stderr)

roads.cpp: In function 'std::vector<long long int> minimum_closure_costs(int, std::vector<int>, std::vector<int>, std::vector<int>)':
roads.cpp:10:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |   for(int i=0;i<W.size();i++){
      |               ~^~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...