Codeforces Beta Round 83 (Div. 2 Only)


A. Palindromic Times
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
12:21
Output
13:31
Input
23:59
Output
00:00
----------------------------------------------------------------------------------------------------
B. Datatypes
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
64 16 32
Output
NO
Input
4
4 2 1 3
Output
YES
----------------------------------------------------------------------------------------------------
C. Dorm Water Supply
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 2
1 2 10
2 3 20
Output
1
1 3 10
Input
3 3
1 2 20
2 3 10
3 1 5
Output
0
Input
4 2
1 2 60
3 4 50
Output
2
1 2 60
3 4 50
----------------------------------------------------------------------------------------------------
D. Basketball Team
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 2 1
2 1
Output
1
Input
3 2 1
1 1
Output
-1
Input
3 2 1
2 2
Output
0.666667
----------------------------------------------------------------------------------------------------
E. Arrangement
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 2001 2
1 2
2 3
Output
1 2 3
Input
7 2020 6
1 2
1 3
2 4
2 5
3 6
3 7
Output
1 2 3 7 4 6 5
Input
10 3630801 0
Output
The times have changed
Input
3 2001 3
1 2
2 3
3 1
Output
The times have changed
----------------------------------------------------------------------------------------------------
