Kotlin Heroes 5: ICPC Round (Practice)


A. A+B (Trial Problem)
time limit per test: 2.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
4
1 5
314 15
-99 99
123 987
Output
6
329
0
1110
----------------------------------------------------------------------------------------------------
B. Candies and Two Sisters
time limit per test: 2.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
6
7
1
2
3
2000000000
763243547
Output
3
0
0
1
999999999
381621773
----------------------------------------------------------------------------------------------------
C. Equalize Prices Again
time limit per test: 2.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
3
5
1 2 3 4 5
3
1 2 2
4
1 1 1 1
Output
3
2
1
----------------------------------------------------------------------------------------------------
D. Construct the String
time limit per test: 4.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
4
7 5 3
6 1 1
6 6 1
5 2 2
Output
tleelte
qwerty
vvvvvv
abcde
----------------------------------------------------------------------------------------------------
E. Binary String Minimizing
time limit per test: 2.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
3
8 5
11011010
7 9
1111100
7 11
1111100
Output
01011110
0101111
0011111
----------------------------------------------------------------------------------------------------
F. Platforms Jumping
time limit per test: 2.0 s
memory limit per test: 512 MB
input: standard input
output: standard output

Examples
Input
7 3 2
1 2 1
Output
YES
0 1 0 2 2 0 3 
Input
10 1 11
1
Output
YES
0 0 0 0 0 0 0 0 0 1 
Input
10 1 5
2
Output
YES
0 0 0 0 1 1 0 0 0 0 
----------------------------------------------------------------------------------------------------
