Submission #1145326

#TimeUsernameProblemLanguageResultExecution timeMemory
1145326SmuggingSpunWiring (IOI17_wiring)C++20
13 / 100
14 ms1864 KiB
#include "wiring.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; ll min_total_length(vector<int>r, vector<int>b){ ll ans = 0; if(r.back() < b[0]){ int i = r.size(), j = b.size(); while(i > 0 && j > 0){ ans += b[--j] - r[--i]; } while(i > 0){ ans += b[0] - r[--i]; } while(j > 0){ ans += b[--j] - r.back(); } } 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...