Editorial for ICPC BAPC 2021 G - Gyrating Glyphs
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
- Problem: Reverse engineer the
operators using
queries:
- First, solve the problem for
operators with a single query
.
- Use this to find all operators in
queries.
- Example with
operators:
- We consider the case with
operators.
- Let
where
is random in
.
- For all
possibilities for the
operators, compute the query outcome.
- If all outcomes are distinct (
) we have a lookup table.
- If not, repeat with a new random query.
Comments