VK Cup 2015 - Wild Card Round 1


A. Quadratic equation
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 -2 1
Output
1
Input
1 0 -1
Output
-1 1
Input
2 -3 1
Output
0.5 1
----------------------------------------------------------------------------------------------------
B. String inside out
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
codeforces
Output
fedocsecro
Input
qwertyasdfgh
Output
ytrewqhgfdsa
----------------------------------------------------------------------------------------------------
C. Diophantine equation
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 5 35
Output
2
5 4
10 1
Input
3 35 5
Output
0
----------------------------------------------------------------------------------------------------
D. Set subtraction
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 900
902 999
Output
2 901 1000
Input
3
1 500
200 746
150 1000
Output
0
----------------------------------------------------------------------------------------------------
E. Sum and product
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 1
Output
2 3
Input
3 5
Output
1 2 8
----------------------------------------------------------------------------------------------------
F. Jumping frogs
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

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

Examples
Input
arc
bug
Output
8
Input
dome
drone
Output
19
----------------------------------------------------------------------------------------------------
H. Points in triangle
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 1
1 3
Output
6.0
Input
2
2 1
1 2
Output
4.5
----------------------------------------------------------------------------------------------------
I. Different variables
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 1
2 1 2
Output
1 2
Input
3 2
2 1 2
2 2 3
Output
1 2 1
----------------------------------------------------------------------------------------------------
