Submission #127051

#TimeUsernameProblemLanguageResultExecution timeMemory
127051MasterdanWiring (IOI17_wiring)C++14
13 / 100
36 ms3832 KiB
#include "wiring.h" #include <bits/stdc++.h> #define MAX 1000000000000000000 #define MIN -1 #define pb push_back #define mp make_pair #define all(a) a.begin (), a.end() using namespace std; typedef vector <int> vi; typedef long long int ll; long long min_total_length(vector<int> r,vector<int> b) { int a = r.size(); int t = b.size(); int i = a-1; int j = 0; ll s = 0; while (i >= 0 and j < t){ s += b[j]-r[i]; i--; j++; } while (i >= 0){ s += b[0]-r[i]; i--; } while (j < t){ s+= b[j]-r[a-1]; j++; } return s; }
#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...