Codeforces Round 451 (Div. 2)


A. Rounding
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
Output
0
Input
113
Output
110
Input
1000000000
Output
1000000000
Input
5432359
Output
5432360
----------------------------------------------------------------------------------------------------
B. Proper Nutrition
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7
2
3
Output
YES
2 1
Input
100
25
10
Output
YES
0 10
Input
15
4
8
Output
NO
Input
9960594
2551
2557
Output
YES
1951 1949
----------------------------------------------------------------------------------------------------
C. Phone Numbers
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
ivan 1 00123
masha 1 00123
Output
2
masha 1 00123 
ivan 1 00123 
Input
3
karl 2 612 12
petr 1 12
katya 1 612
Output
3
katya 1 612 
petr 1 12 
karl 1 612 
Input
4
ivan 3 123 123 456
ivan 2 456 456
ivan 8 789 3 23 6 56 9 89 2
dasha 2 23 789
Output
2
dasha 2 23 789 
ivan 4 789 123 2 456 
----------------------------------------------------------------------------------------------------
D. Alarm Clock
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3 2
3 5 1
Output
1
Input
5 10 3
12 8 18 25 1
Output
0
Input
7 7 2
7 3 4 1 6 5 2
Output
6
Input
2 2 2
1 3
Output
0
----------------------------------------------------------------------------------------------------
E. Squares and not squares
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
12 14 30 4
Output
2
Input
6
0 0 0 0 0 0
Output
6
Input
6
120 110 23 34 25 45
Output
3
Input
10
121 56 78 81 45 100 1 0 54 78
Output
0
----------------------------------------------------------------------------------------------------
F. Restoring the Expression
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
12345168
Output
123+45=168
Input
099
Output
0+9=9
Input
199100
Output
1+99=100
Input
123123123456456456579579579
Output
123123123+456456456=579579579
----------------------------------------------------------------------------------------------------
