Submission #812545

#TimeUsernameProblemLanguageResultExecution timeMemory
812545Dan4LifeWiring (IOI17_wiring)C++17
13 / 100
27 ms3796 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; #define sz(a) (int)a.size() #define all(a) begin(a),end(a) using ll = long long; ll min_total_length(vector<int> a, vector<int> b) { int n = sz(a), m = sz(b); ll tot = 0; for(int i = 0; i < m; i++) tot+=b[i]; for(int i = 0; i < n; i++) tot-=a[i]; if(n<m){ for(int i = 0; i < m-n; i++) tot-=a.back(); } else if(n>m){ for(int i = 0; i < n-m; i++) tot+=b[0]; } return tot; }
#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...