- Time limit: 1.00 s
- Memory limit: 512 MB
Implement naive random access for VByte encoded data.
Input data is read from a file given as a command line argument.
First encode n in put integers, then output
data_structure[q_i] for each of the q query integers.
Simply scan from the beginning for each of the query values.
The tests will also use the
-n -q command line flags when invoking your program, to be compatible with other tests that could use the same program.
All 64-bit unsigned binary integers:
n, followed by
n integers, followed by
q, followed by
q integers in the [0, n) range.
data_structure[q_i] for each of the q integers.
- n << 2^32
Input (in binary):
2, 7, 500, 2, 1, 0