Submission #826311

#TimeUsernameProblemLanguageResultExecution timeMemory
826311caganyanmazWiring (IOI17_wiring)C++17
13 / 100
24 ms3876 KiB
#include <bits/stdc++.h> #define int int64_t using namespace std; #include "wiring.h" constexpr static int MXSIZE = 1e5; long long min_total_length(vector<int32_t> r, vector<int32_t> b) { int m = r.back(); int sum = 0; for (int i : r) sum += m - i; for (int i : b) sum += i - m; if (r.size() > b.size()) sum += (b[0] - m) * (r.size() - b.size()); return sum; }
#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...