# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
262254 | youssefbou62 | Wiring (IOI17_wiring) | C++14 | 20 ms | 19456 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "wiring.h"
#include <bits/stdc++.h>
#define sz(x) (int)x.size()
#define ll long long
#define pb push_back
#define all(x) x.begin(),x.end()
#define fi first
#define se second
using namespace std;
const int MAXN = 2e5+1 ;
ll dp[MAXN][20];
vector<int> adj[MAXN],adj1[MAXN];
void mins(ll& a ,ll b ){
a = min ( a , b ) ;
}
long long min_total_length(vector<int> r, vector<int> b) {
int R = sz(r) , B = sz(b) ;
ll ans = 1e18 ;
for(int i = 0 ; i <= R ; i++ )for(int j = 0 ; j <= 19 ; j++ )dp[i][j] = 1e18;
vector<pair<int,int>> connections;
for(int i = 0 ; i < R ; i++ ){
connections.pb({r[i],-i-1});
}
for(int i = 0 ; i < B ; i++ ){
connections.pb({b[i],i+1});
}
sort(all(connections));
Compilation message (stderr)
# | 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... |