Submission #426433

#TimeUsernameProblemLanguageResultExecution timeMemory
426433jeqchoWiring (IOI17_wiring)C++17
13 / 100
41 ms3780 KiB
#include "wiring.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<pii> vpi; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define F0R(i,b) FOR(i,0,b) #define ROF(i,a,b) for(int i=(b)-1;i>=(a);--i) #define R0F(i,b) ROF(i,0,b) #define all(x) begin(x),end(x) #define sz(x) int(x.size()) #define pb push_back #define rsz resize #define trav(a,x) for(auto&a :x) ll min_total_length(vi r, vi b) { ll sum=0; F0R(i,min(sz(r),sz(b))) { sum += b[i]-r[i]; } if(sz(b)>sz(r)) { FOR(i,sz(r),sz(b)) { sum += b[i]-r.back(); } } else { FOR(i,sz(b),sz(r)) { sum += b[0]-r[i]; } } return sum; }
#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...