## Avoid Fixed Points NOFIX Solution Codechef

Avoid Fixed Points NOFIX Solution Chef has a sequence of N integers A=[A1,A2,…,AN]. He can perform the following operation any number of times (possibly, zero): For example, if A=[5,3,4] and Chef selects K=2, then after the operation he can obtain one of the sequences [2-,5,3,4],[5,2-,3,4],[5,3,2-,4] or [5,3,4,2-]. Chef wants this sequence to satisfy the following condition: for each 1≤i≤∣A∣, Ai≠i. Here, ∣A∣ denotes the length of A. Help … Read more

## Random OR Solution Codechef

Random OR Solution Codechef Chef is playing a game, which he starts with a score of S=0. He also has an integer N. In one move, Chef does the following: For example, if Chef’s current score is S=6 and he picks X=10, his new score is 6∣10=14. Chef stops when his score SS becomes equal to 2N−1. What is the expected number of moves … Read more

## Digit Multiplication By K Solution Codechef

Digit Multiplication By K Solution Codechef There is a strange game played in ChefLand. The game starts with N white balls, the i-th of which has a power of Si. It is known that 0≤Si≤9. On each level, a black ball with power K hits each of the white balls. After the collision, the power of each white ball is multiplied by K. … Read more