# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1158995 | emptypringlescan | Wiring (IOI17_wiring) | C++20 | 24 ms | 10780 KiB |
#include <bits/stdc++.h>
using namespace std;
#include "wiring.h"
vector<pair<long long,int> > arr;
long long min_total_length(vector<int> r, vector<int> b){
arr.push_back({-1,-1});
int c1=0,c2=0;
while(c1<(int)r.size()||c2<(int)b.size()){
if(c1==(int)r.size()){
arr.push_back({b[c2],1});
c2++;
}
else if(c2==(int)b.size()){
arr.push_back({r[c1],0});
c1++;
}
else if(r[c1]<b[c2]){
arr.push_back({r[c1],0});
c1++;
}
else{
arr.push_back({b[c2],1});
c2++;
}
}
long long dp[200005];
for(int i=0; i<200005; i++) dp[i]=1e16;
dp[0]=0;
int pst=0,curst=1;
long long back[200005],pref[200005],best,cur,sum;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |