5867: ABC165 —— E - Rotation Matching
Description
-
For each pla
yer, if there is a playing field that is assigned the pla yer's integer, the pla yer goes to that field and fight the other pla yer who comes there. -
Then, each pla
yer adds $1$ to its integer. If it becomes $N+1$, change it to $1$.
Input
$N\ M$
Output
$a_1\ b_1$
$a_2\ b_2$
$\dots$
$a_M\ b_M$
Constraints
$M×2+1≤N≤200000$
Sample 1 Input
4 1
Sample 1 Output
2 3
Let us call the four pla
No pla
Sample 2 Input
7 3
Sample 2 Output
1 6
2 5
3 4