# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1149639 | Perl32 | Road Construction (JOI21_road_construction) | C++20 | 2577 ms | 127668 KiB |
//I wrote this code 4 u <3
#pragma GCC optimize("Ofast,unroll-loops,fast-math")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include "algo/debug.h"
#else
#define debug(...) 42
#endif
template<typename T> using normal_queue = priority_queue<T, vector<T>, greater<T>>;
struct WT {
vector<vector<ll>> t, pref;
vector<ll> srt;
int sz;
WT(vector<ll>& a) {
srt = a;
sort(srt.begin(), srt.end());
srt.resize(unique(srt.begin(), srt.end()) - srt.begin());
sz = 1;
while (sz < (int) srt.size()) sz <<= 1;
t.resize(sz << 1);
pref.resize(sz << 1);
for (auto& x : a) x = lower_bound(srt.begin(), srt.end(), x) - srt.begin();
t[1] = a;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |