Submission #434210

#TimeUsernameProblemLanguageResultExecution timeMemory
434210OttoTheDinoWiring (IOI17_wiring)C++17
13 / 100
32 ms3780 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; #define rep(i,s,e) for (int i = s; i <= e; ++i) #define rrep(i,s,e) for (int i = s; i >= e; --i) #define pb push_back #define pf push_front #define fi first #define se second #define all(a) a.begin(), a.end() typedef long long ll; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<int> vi; typedef vector<double> vd; typedef vector<string> vs; typedef vector<char> vc; typedef vector<ll> vll; ll min_total_length(vi r, vi b) { int n = r.size(), m = b.size(); ll ans = 0; rep (i,0,max(n,m)-1) { if (i>=min(n,m)) { if (n>m) ans += b[0]-r[n-1-i]; else ans += b[i]-r[n-1]; } else ans += b[i]-r[n-1-i]; } 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...