Submission #1144683

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11446832025-02-03 14:30:52Can_I_Put_ma_ballzSaveit (IOI10_saveit)C++20
25 / 100
134 ms10392 KiB
#include <bits/stdc++.h>
#include "grader.h"
#include "encoder.h"
using u8 = uint8_t;
void encode_byte(u8 bits) {
for (int i = 0; i < 8; ++i)
encode_bit((bits >> i) & 1);
}
void encode_varint(int x) {
do {
u8 byte = x & 0x7f;
x >>= 7;
if (x != 0)
byte |= 0x80;
encode_byte(byte);
} while (x != 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);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...