Penelope is playing a game on an
Penelope isn't sure she likes her grid though. Specifically, she is worried that her grid isn't beautiful. A grid is beautiful if every row sum and column sum are even.
Penelope is in a hurry to make her grid beautiful so she asks you: how can she make her grid beautiful? On each move, you can flip the value of a grid cell: from
Constraints
All cells given are distinct.
Subtask 1 [30%]
Subtask 2 [70%]
No additional constraints.
Input Specification
The first line contains
The next
Output Specification
On the first line output
On the next
You may output any valid sequence.
Note: your output must follow the standard convention of not having any extra whitespace, and it must end with a new line.
Scoring
If you output an incorrect value
If you output a correct value
If you output a correct value of
Your score for a subtask will be the minimum score across all test cases of that subtask.
Sample Input
2 3 3
1 1
1 3
2 1
Sample Output
1
2 3
Explanation
Note that after our operation, our grid is:
1 0 1
1 0 1
which satisfies the constraints.
Comments
can someone tell me why im getting presentation error? there shoudlnt be aqny extra whitespace
I think for whatever value A you got, you didn't output A lines afterwards