Cook-a-bit
CodeChefOpen on judge ↗
Naveen made an encryption algorithm for the Introduction to Cryptography course project. The algorithm takes input a bit-string $S$ of length $N$ and returns a ciphertext of the same length. The pseudo-code for the algorithm is - ```cpp Encryption (S, N ) { cipher = S for i → 1 to N : j = ( i == N ) ? 1 : i+1 if ( S[i] == '1' and S[j] == '0' ) : ciphe
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start