Submission #417844

#TimeUsernameProblemLanguageResultExecution timeMemory
417844rGamerWiring (IOI17_wiring)C++17
13 / 100
28 ms1868 KiB
#include <bits/stdc++.h> #define ll long long using namespace std; ll min_total_length(vector<int> r, vector<int> b) { int n = r.size(), m = b.size(); if(r[n-1] < b[0]) { ll ans = 0; int i = 0, j = 0; while(i < n or j < m) { if(i < n and j < m) ans += b[j++] - r[i++]; else if(i == n) ans += b[j++] - r[n - 1]; else ans += b[0] - r[i++]; } return ans; } return 0; }
#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...