Guess Two Strings

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

This is an interactive problem.

Jury has chosen two secret binary strings of length NN and called them ss and tt such that ss is not lexicographically greater than tt. Your task is to find out which strings were chosen. To do that, you can ask the jury to generate up to QQ strings. Each such string rr will be generated in the following way:

  1. start by assigning r=sr = s or r=tr = t, choosing one of them randomly with equal probability,
  2. randomly select KK distinct positions in the string rr so that each set of KK positions has equal probability of being selected,
  3. flip the digits at the selected positions in rr: change all "0"s to "1"s and all "1"s to "0"s,
  4. give the modified string rr to you.

Note that ss and tt don't change during generation of string rr.

Your task is to correctly guess ss and tt.

힌트

This example violates the constraints, and is given only to illustrate the process of interaction. All tests in the testing system will satisfy all the constraints from the statement.