Submission #1144694

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11446942025-02-03 14:56:12otesunkiSaveit (IOI10_saveit)C++20
25 / 100
1116 ms71508 KiB
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
void encode_fib(unsigned x) {
x ^= 3;
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);
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...