Submission #60223

#TimeUsernameProblemLanguageResultExecution timeMemory
60223ruhanhabib39Wiring (IOI17_wiring)C++17
13 / 100
49 ms14400 KiB
#include "wiring.h" #include <bits/stdc++.h> long long min_total_length(std::vector<int> r, std::vector<int> b) { long long r_sum = accumulate(r.begin(), r.end(), 0LL); long long b_sum = accumulate(b.begin(), b.end(), 0LL); long long rn = r.size(), bn = b.size(); if(rn > bn) b_sum += b[0] * (rn - bn); else if(rn < bn) r_sum += r.back() * (bn - rn); return b_sum - r_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...