Submission #383666

#TimeUsernameProblemLanguageResultExecution timeMemory
383666aris12345678Wiring (IOI17_wiring)C++14
0 / 100
22 ms2924 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; #define int64 long long const int mxN = 1e6+5; int64 min_total_length(vector<int> r, vector<int> b) { int i = r.size()-1, j = b.size()-1; int64 ans = 0; while(i >= 0 && j >= 0) ans += (b[j]-r[i]), i--, j--; while(i >= 0) ans += (b[0]-r[i]), i--; while(j >= 0) ans += (b[j]-r[0]), j--; 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...