# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1014798 | hotboy2703 | Wiring (IOI17_wiring) | C++17 | 38 ms | 10008 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 <vector>
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define pll pair <ll,ll>
#define fi first
#define se second
#define MP make_pair
#define sz(a) (ll((a).size()))
#define BIT(mask,i) (((mask) >> (i))&1)
#define MASK(i) (1LL << (i))
pll a[200100];
ll dist[200100];
ll sum[200100];
ll dp[200100];
const ll INF = 1e18;
long long min_total_length(std::vector<int> r, std::vector<int> b){
ll n = sz(r)+sz(b);
for (ll i = 1;i <= n;i ++){
if (i <= sz(r))a[i] = MP(r[i-1],0);
else a[i] = MP(b[i-sz(r)-1],1);
}
sort(a+1,a+1+n);
{
ll last[2] = {-1,-1};
for (ll i = 1;i <= n;i ++){
sum[i] = a[i].fi + sum[i-1];
dist[i] = INF;
# | 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... |