Surprise Language Round 8


A. The Check of the Point
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 1 1
Output
0
Input
4 4 4
Output
1
Input
10 5 -4
Output
2
----------------------------------------------------------------------------------------------------
B. The Teacher of Physical Education
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
Ivan 150
Igor 215
Dasha 158
Katya 150
Output
Ivan
Katya
Dasha
Igor
Input
2
SASHA 180
SASHA 170
Output
SASHA
SASHA
----------------------------------------------------------------------------------------------------
C. Symmetric Difference
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 1 2 3
3 2 3 4
Output
2 1 4
Input
5 1 4 8 9 10
4 1 2 8 10
Output
3 2 4 9
----------------------------------------------------------------------------------------------------
D. Chocolate Bar
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
3 3 4
4 4 7
Output
Yes
No
----------------------------------------------------------------------------------------------------
E. Hammer throwing
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
2 0 1 0
Output
2 4 1 3 
Input
6
2 2 0 1 1 0
Output
3 6 1 2 4 5 
----------------------------------------------------------------------------------------------------
F. Reformat the String
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
  hello ,i AM veRy GooD.Boris
Output
Hello, i am very good. Boris
Input
       a. b,   C  .   
Output
A. B, c.
----------------------------------------------------------------------------------------------------
G. The Fraction
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
0.2(45)
Output
27/110
Input
0.75(0)
Output
3/4
----------------------------------------------------------------------------------------------------
H. Exchange of Books
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 1
2 4 1 3
Output
3 1 4 2 
Input
5 5
3 4 5 2 1
Output
3 4 5 2 1 
Input
6 18
2 3 5 1 6 4
Output
1 2 3 4 5 6 
----------------------------------------------------------------------------------------------------
I. Loader
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
..Y
.BX
..T
Output
YES
wSwsE
Input
3 3
.BY
...
TXX
Output
NO
----------------------------------------------------------------------------------------------------
J. The Hero with Bombs
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 5
XEX.X
X.XXT
X.X.X
Output
SSMNNTSSNEMWWTEEEE
----------------------------------------------------------------------------------------------------
