- Time limit: 2.00 s
- Memory limit: 512 MB
Implement a generalized version VByte encoding and decoding from A31 but fast.
A binary input stream, consisting of 64-bit unsigned integers. The first integer, n, is how many additional integers are in the input.
After encoding the n integers, output to
cerr the number of blocks used to encode the input, after this, repeate back the input sequence.
- n << 10^8
- k < 56
With k = 4
2, 7, 500
(in 64-bit binary)
4, 7, 500
I.e. The number of blocks = 4, followed by the input integers 7 and 500.