Valkyrie TradingOA #3
Max Element Indices After Array Rotations
估计简单评测数据准备中,可先阅读题面
Parse a string of form "data;rotations" into two arrays. For each number k in rotations, perform k left rotations on a fresh copy of the original data array, then output the index of the max element. Output is a space-separated list of indices.
Left rotation: first element moves to the end; everything else shifts left by 1. After 1 rotation on (10, 20, 50) → (20, 50, 10).
Examples:
"10 20 30 40 50;1 2 3"→"3 2 1""99 1 2 3 4;1 2 5"→"4 3 0"