Submission #301713

#TimeUsernameProblemLanguageResultExecution timeMemory
301713TMJNWiring (IOI17_wiring)C++17
13 / 100
42 ms3840 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; long long min_total_length(vector<int>r,vector<int>b){ long long res=0; if(r.size()>b.size()){ for(int i:r){ res+=b.front()-i; } for(int i:b){ res+=i-b.front(); } } else{ for(int i:r){ res+=r.back()-i; } for(int i:b){ res+=i-r.back(); } } return res; }
#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...