Codeforces Round 109 (Div. 2)


A. I_love_%username%
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
100 50 200 150 200
Output
2
Input
10
4664 6496 5814 7010 5762 5736 6944 4850 3698 7242
Output
4
----------------------------------------------------------------------------------------------------
B. Combination
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1 0
2 0
Output
2
Input
3
1 0
2 0
0 2
Output
3
----------------------------------------------------------------------------------------------------
C. Hometask
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
ababa
1
ab
Output
2
Input
codeforces
2
do
cs
Output
1
----------------------------------------------------------------------------------------------------
D. Colliders
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 10
+ 6
+ 10
+ 5
- 10
- 5
- 6
+ 10
+ 3
+ 6
+ 3
Output
Success
Conflict with 6
Success
Already off
Success
Success
Success
Success
Conflict with 10
Already on
----------------------------------------------------------------------------------------------------
E. Double Profiles
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
1 2
2 3
1 3
Output
3
Input
3 0
Output
3
Input
4 1
1 3
Output
2
----------------------------------------------------------------------------------------------------
