# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
482787 | solarmagic | timeismoney (balkan11_timeismoney) | C++17 | 75 ms | 776 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 <bits/stdc++.h>
#define all(x) begin(x), end(x)
using namespace std;
using db = long double;
using ll = long long;
db MAX = 1e5;
struct edge{
ll a, b, t, c;
db k;
};
ll n, m;
vector<edge> v;
vector<ll> p, sz;
ll find(ll x){
if(x == p[x]) return x;
return p[x] = find(p[x]);
}
void init(ll mid) {
fill(all(sz), 1);
iota(all(p), 0);
for (auto& [a, b, t, c, k] : v) {
k = c * mid + t * (MAX - mid);
}
sort(all(v), [](auto& a, auto& b){return a.k < b.k;});
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |