cf/mirror

Guess One Character

CF
2038G1900· candidate master2s512 MB⇄ interactive

Examples

Sample 1of 1
Input
3 // 3 test cases
3 // the length of the string is 3
 
1 // 101 occurs once
 
1 // guessed correctly
2 // the length of the string is 2
 
0 // 00 occurs zero times
 
0 // 0 occurs zero times
 
1 // guessed correctly
2 // the length of the string is 2
 
1 // 1 occurs once
 
0 // 01 occurs zero times
 
1 // guessed correctly
Output
1 101 // how many times 101 occurs
 
0 2 0 // guess: s[2] is 0
 
 
1 00 // how many times 00 occurs
 
1 0 // how many times 0 occurs
 
0 1 1 // guess: s[1] is 1
 
 
1 1 // how many times 1 occurs
 
1 01 // how many times 01 occurs
 
0 2 0 // guess: s[2] is 0
2038G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)