Problem C
Pönnukökur
Languages
en
is
Signý is making pancakes. The pancakes have two sides, side
Input
The first line contains two integers
-
Signý flips pancake
. The input is of the format 1 i, where . -
Signý flips all pancakes. The input is of the format 2.
-
Signý asks how many pancakes have side
facing upwards. The input is of the format 3. -
Signý asks how many pancakes have side
facing upwards from pancake to pancake . The input is of the format 4 l r.
Output
For each question print a single integer, the answer to the question. The answers should come in the same order as the questions they answer.
Scoring
Group |
Points |
Constraints |
1 |
20 |
|
2 |
14 |
|
3 |
30 |
|
4 |
36 |
|
Sample Input 1 | Sample Output 1 |
---|---|
3 7 1 1 3 1 2 3 1 3 1 2 3 |
1 2 2 |
Sample Input 2 | Sample Output 2 |
---|---|
2 5 3 1 1 2 3 3 |
0 1 1 |
Sample Input 3 | Sample Output 3 |
---|---|
9 6 3 2 2 1 9 4 2 9 3 |
0 1 1 |