Alice and Matrix
CodeChefOpen on judge ↗
Alice find one infinite matrix , in which the numbers are filled in spiral form. Alice Wants to find out the number in row $X$ and column $Y$l(i.e. Matrix[X][Y]). ### Input The first input line contains an integer $T$ : the number of tests. After this, there are $T$ lines, each containing integers $X$ and $Y$. ### Output For each test, print the number in row $X$ and column $Y$. ### Constrai
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