← All problemsSign in

Interval Game

CodeChefRating 2275Open on judge ↗

Chef and his brother Chefu are playing a game. The game consist of two sequences of integers A of length N and B of length M, and it will last for exactly M turns, Chef will play in odd turns whereas Chefu will play in even turns (turns and sequences are 1-based). In the i-th turn, the corresponding player should select an interval (continuous subsegment) of sequence A of length Bi that is strict

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start