CROC-MBTU 2012, Elimination Round (ACM-ICPC)


A. System Administrator
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 5 5
2 6 4
Output
LIVE
LIVE
Input
3
1 0 10
2 0 10
1 10 0
Output
LIVE
DEAD
----------------------------------------------------------------------------------------------------
B. Internet Address
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
httpsunrux
Output
http://sun.ru/x
Input
ftphttprururu
Output
ftp://http.ru/ruru
----------------------------------------------------------------------------------------------------
C. Game with Coins
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
1
Output
-1
Input
3
1 2 3
Output
3
----------------------------------------------------------------------------------------------------
D. Restoring Table
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
-1
Output
0 
Input
3
-1 18 0
18 -1 0
0 0 -1
Output
18 18 0 
Input
4
-1 128 128 128
128 -1 148 160
128 148 -1 128
128 160 128 -1
Output
128 180 148 160 
----------------------------------------------------------------------------------------------------
E. Mishap in Club
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
+-+-+
Output
1
Input
---
Output
3
----------------------------------------------------------------------------------------------------
F. Log Stream Analysis
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
60 3
2012-03-16 16:15:25: Disk size is
2012-03-16 16:15:25: Network failute
2012-03-16 16:16:29: Cant write varlog
2012-03-16 16:16:42: Unable to start process
2012-03-16 16:16:43: Disk size is too small
2012-03-16 16:16:53: Timeout detected
Output
2012-03-16 16:16:43
Input
1 2
2012-03-16 23:59:59:Disk size
2012-03-17 00:00:00: Network
2012-03-17 00:00:01:Cant write varlog
Output
-1
Input
2 2
2012-03-16 23:59:59:Disk size is too sm
2012-03-17 00:00:00:Network failute dete
2012-03-17 00:00:01:Cant write varlogmysq
Output
2012-03-17 00:00:00
----------------------------------------------------------------------------------------------------
G. Suggested Friends
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
Mike Gerald
Kate Mike
Kate Tank
Gerald Tank
Gerald David
Output
5
Mike 1
Gerald 1
Kate 1
Tank 1
David 2
Input
4
valera vanya
valera edik
pasha valera
igor valera
Output
5
valera 0
vanya 3
edik 3
pasha 3
igor 3
----------------------------------------------------------------------------------------------------
H. Queries for Number of Palindromes
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
caaaba
5
1 1
1 4
2 3
4 6
4 5
Output
1
7
3
4
2
----------------------------------------------------------------------------------------------------
