# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1144646 | Can_I_Put_ma_ballz | Saveit (IOI10_saveit) | C++20 | 763 ms | 46976 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 & ((1 << 7) - 1);
x >>= 7;
if (x != 0)
byte |= 1 << 7;
encode_byte(byte);
} while (x != 0);
}
void encode(int nv, int nh, int ne, int *v1, int *v2){
encode_varint(ne);
for (int i = 0; i < ne ; ++i) {
encode_varint(v1[i]);
encode_varint(v2[i]);
}
return;
}
# | 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... |