Codeforces Round 127 (Div. 1)


A. Clear Symmetry
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
Output
3
Input
9
Output
5
----------------------------------------------------------------------------------------------------
B. Guess That Car!
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 3
3 4 5
3 9 1
Output
392
1 1
Input
3 4
1 0 0 0
0 0 3 0
0 0 5 5
Output
240
2 3
----------------------------------------------------------------------------------------------------
C. Fragile Bridges
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
2 1 2 1
Output
5
----------------------------------------------------------------------------------------------------
D. Brand New Problem
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
find the next palindrome
1
10 find the previous palindrome or print better luck next time
Output
1
[:||||||:]
Input
3
add two numbers
3
1 add
2 two two
3 numbers numbers numbers
Output
Brand new problem!
Input
4
these papers are formulas
3
6 what are these formulas and papers
5 papers are driving me crazy
4 crazy into the night
Output
1
[:||||:]
Input
3
add two decimals
5
4 please two decimals add
5 decimals want to be added
4 two add decimals add
4 add one two three
7 one plus two plus three equals six
Output
3
[:|||:]
----------------------------------------------------------------------------------------------------
E. Thoroughly Bureaucratic Organization
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
4 1
4 2
7 3
1 1
42 7
Output
3
2
3
0
11
----------------------------------------------------------------------------------------------------
