Submission #70571

#TimeUsernameProblemLanguageResultExecution timeMemory
70571KmcodeWiring (IOI17_wiring)C++14
0 / 100
3 ms528 KiB
#include <bits/stdc++.h> using namespace std; #include "wiring.h" long long min_total_length(std::vector<int> r, std::vector<int> b) { int rr=r.size()-1; int bb=0; long long int dist=0; while(rr>=0||bb<b.size()){ dist+=b[min((int)b.size()-1,bb)]-r[max(0,rr)]; rr--; bb++; } return dist; }

Compilation message (stderr)

wiring.cpp: In function 'long long int min_total_length(std::vector<int>, std::vector<int>)':
wiring.cpp:12:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(rr>=0||bb<b.size()){
               ~~^~~~~~~~~
#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...