mBIT Standard Spring 2021
A. Mountain Climbing
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
5
2 5 3 4 1
Output
17

B. Digit Sum
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
11 3
Output
137

C. Reverse Race
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
I think the Montgomery Blair Informatics Tournament is so fun
Output
nuf os si Tnemanruot Scitamrofni Rialb Yremogtnom eht kniht I 

D. Apple Orchard
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
3 4 2 1 10 10 20 1
Output
7

E. Pokémon Permutation
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
atatatraartttaarttata
Output
rattatarattatarattata

F. Island Isolation
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
6
1 2
2 3
2 4
1 5
5 6
Output
2 3
2 4
1 2
5 1
5 6
1 5
2 1
3 2
4 2
6 5

G. Map Matching
time limit per test
1 s
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
2
4
0 0
2 2
10 2
8 0
5 -5
1 -5
2 -4
6 -4
3
1 0
0 2
1 2
0 0
2 1
2 0
Output
YES
NO

H. Street Layout
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
2 3 7
4 6
Output
1

I. Grid Shuffling
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
4 8
0 0 1 0
0 3 0 2
7 0 0 6
0 4 5 0
Output
4 7 3 1
5 6 2 0
0 0 0 0
0 0 0 0

J. Goomba Grouping
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
2
8 1
1 10
Output
9 13 16 15 19 20 15 18
-1

K. Rabbit Subtraction
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
5
9 12 1 3 7
Output
6

L. Squid Art
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
6 10
0100000001
0011010100
1001101101
1010011010
0011101101
0101001011
Output
2