3847. Find the Score Difference in a Game
You are given an integer array nums, where nums[i] represents the points scored in the ith game. There are exactly two players. Initially, the first player is active and the second player is inactive. The following rules apply sequentially for each game i: - If nums[i] is odd, the active and inactive players swap roles. - In every 6th game (that is, game indices 5, 11, 17, ...), the active and
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