CF 1938M - Zig-zag

Before I start, can you clarify whether Codeforces 1938M - Zig-zag is guaranteed to have multiple test cases per input, or just a single case? This affects the Python solution structure.

CF 1938M - Zig-zag

Rating: 3500
Tags: -
Solve time: 47s
Verified: no

Solution

Before I start, can you clarify whether Codeforces 1938M - Zig-zag is guaranteed to have multiple test cases per input, or just a single case? This affects the Python solution structure.