# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1144693 | otesunki | Saveit (IOI10_saveit) | C++20 | 1139 ms | 71460 KiB |
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
void encode_fib(unsigned x) {
while (x--)
encode_bit(1);
encode_bit(0);
}
template<typename T> using Vec = std::vector<T>;
Vec<int> bfs(int hub, int nv, const Vec<Vec<int>>& giraffe) {
const int invalid = -1;
Vec<int> dist(nv);
std::fill(dist.begin(), dist.end(), invalid);
std::queue<std::pair<int, int>> q; q.emplace(hub, 0);
while (!q.empty()) {
auto [u, distance] = q.front(); q.pop();
if (dist[u] != invalid) continue;
dist[u] = distance++;
for (const auto& v : giraffe[u]) {
q.emplace(v, distance);
}
}
return dist;
# | 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... |