alexjercan/bugnet huggingface dataset:
Problem p00931 test case
Input:
8 900 0
40 100
70 -80
350 30
680 -20
230 230
300 400
530 130
75 -275

Expected output:
1210.99416
Problem p00932 test case
Input:
2 5 4
5 7
4 8

Expected output:
8 7
Problem p00933 test case
Input:
6 5 1 2 3
5 5 5
1 5 5
2 5 4
3 5 3
4 5 2
5 5 1

Expected output:
0.631579
Problem p00934 test case
Input:
3 2 4 0
2 2
-2 -2
-2 2

Expected output:
15
Problem p00935 test case
Input:
3
3 0 1

Expected output:
2
Problem p00936 test case
Input:
2
10 10

Expected output:
40.00000000
Problem p00937 test case
Input:
3 3 1 2 4
1 2
2 3
3 1

Expected output:
IMPOSSIBLE
Problem p00938 test case
Input:
2 10 6
4 4 E
6 4 W

Expected output:
2
Problem p00939 test case
Input:
20

Expected output:
4
Problem p00940 test case
Input:
2 2 7
3 4
3 2
1 3
1 1
2 2
1 2
2 1
1 2
2 2
1 1

Expected output:
5
Problem p00941 test case
Input:
crc
1

Expected output:
crc
Problem p00942 test case
Input:
4 6 5
-2 5
-2 -1
2 -1
2 5
-2 1
-2 0
0 0
0 -2
2 -2
2 1

Expected output:
8
Problem p00943 test case
Input:
6 6
3
1
9
4
3
6
1 2
1 4
2 6
5 4
6 5
3 2

Expected output:
17
Problem p00944 test case
Input:
8 8
1 2
1 3
2 4
2 5
2 8
3 5
3 6
4 7
1000
100
100
10
10
10
1
1
3
2 8 6
2 4 7
2 7 8

Expected output:
1000
10
100
Problem p00945 test case
Input:
5 Alice
10 20 30 40 50

Expected output:
30
Problem p00946 test case
Input:
5 3
4
2
5

Expected output:
5
2
4
1
3
Problem p00947 test case
Input:
0 3 1 7 5 9 8 6 4 2
7 0 9 2 1 5 4 8 6 3
4 2 0 6 8 7 1 3 5 9
1 7 5 0 9 8 3 4 2 6
6 1 2 3 0 4 5 9 7 8
3 6 7 4 2 0 9 5 8 1
5 8 6 9 7 2 0 1 3 4
8 9 4 5 3 6 2 0 1 7
9 4 3 8 6 1 7 2 0 5
2 5 8 1 4 3 6 7 9 0

Expected output:
0
Problem p00948 test case
Input:
4 3
1000 1
2000 2
3000 3

Expected output:
2 3 4 4
Problem p00949 test case
Input:
anagram
grandmother

Expected output:
4
Problem p00950 test case
Input:
ACM

Expected output:
0
Problem p00951 test case
Input:
Alice Bob
3
2
Alice Bob
Bob Clare
2
Bob Clare
Clare David
2
Clare David
David Alice

Expected output:
No
Problem p00952 test case
Input:
6
2
3
1
1
4
2

Expected output:
Yes
Yes
Yes
No
Yes
No
Problem p00953 test case
Input:
2 1
1 2 2

Expected output:
1
Problem p00954 test case
Input:
2
5 6
1000000000 2

Expected output:
4
5 6
0 6
0 0
5 0
3
1000000000 0
0 2
999999999 0
Problem p00955 test case
Input:
4 4
0 0
6 0
6 6
0 6

Expected output:
35.759506
Problem p00956 test case
Input:
4
B
W
WB
WB

Expected output:
5
Problem p00957 test case
Input:
5 3

Expected output:
6
Problem p00958 test case
Input:
4
0 0
1 1
0 2
2 4

Expected output:
1
Problem p00959 test case
Input:
3 20
5
7
3

Expected output:
5
3
2
Problem p00960 test case
Input:
10
-53 62
-19 58
-11 11
-9 -22
45 -7
37 -39
47 -58
-2 41
-37 10
13 42

Expected output:
72.96316928
Problem p00961 test case
Input:
4 4
BWWB
WBBW

Expected output:
2
Problem p00962 test case
Input:
4 5
1 3 5
3 4 6
4 2 7
2 1 18
2 3 12

Expected output:
SAD
SAD
SAD
SOSO
HAPPY
Problem p00963 test case
Input:
CD 30 1
DB 30 1

Expected output:
YES
Problem p00964 test case
Input:
6 3
1 2
1 5
2 3
2 6
4 5
4 6

Expected output:
6
2
Problem p00965 test case
Input:
4
1 3
1 3
3 6
3 6

Expected output:
2 2
Problem p00966 test case
Input:
9 4 5 4
3 C
4 I
7 C
9 P
2 1
4 0
6 2
7 0
8 4
8
1
9
6

Expected output:
ICPC
Problem p00967 test case
Input:
4 5
1 2
1 3
1 4
2 3
3 4

Expected output:
3
Problem p00968 test case
Input:
2
file10
file20
file3

Expected output:
+
-
Problem p00969 test case
Input:
6
0 1 3 5 6 9

Expected output:
4
Problem p00970 test case
Input:
5 2 7
1 1
1 2
1 3
2 3
2 4
4 4
5 2

Expected output:
9
Problem p00971 test case
Input:
0101
1100001

Expected output:
0010
Problem p00972 test case
Input:
4 2
1 2
3 4

Expected output:
2
1 4
2 3
Problem p00973 test case
Input:
4
0 0
10 0
10 10
0 10

Expected output:
10
14.142135623730950488
Problem p00974 test case
Input:
7
3 1 4 1 5 9 2

Expected output:
3
Problem p00975 test case
Input:
5 8
0 0
2 0
0 2
2 2
1 1
1 2
1 3
1 5
2 4
2 5
3 4
3 5
4 5

Expected output:
1
2
2
1
3
Problem p00976 test case
Input:
2 3
001
101

Expected output:
-0-
-00
Problem p00977 test case
Input:
5
1 2
2 3
3 4
2 5
1 2 1 2 3
11
Q 1
Q 2
Q 3
Q 4
U 5 1
Q 1
U 3 2
Q 1
Q 2
U 5 4
Q 1

Expected output:
2
2
0
-1
3
2
2
0
Problem p00978 test case
Input:
5
1 2 3 4 5
1 2 3 4 5

Expected output:
2 3 4 5 1
Problem p00979 test case
Input:
19

Expected output:
5
Problem p00980 test case
Input:
5 4 2
1 1 10
5 4 3

Expected output:
130
Problem p00981 test case
Input:
8 5 10 5
1 1 7
3 1 2
1 5 6
3 1 4
3 6 8

Expected output:
70
Problem p00982 test case
Input:
3
0 0 0
1 0 0
3 0 0
1 2
2 3
0 0 0
0 2 2
0 3 3
4 5
5 6

Expected output:
1
Problem p00983 test case
Input:
6 3
1 3 4 2 6 5

Expected output:
4
Problem p00984 test case
Input:
2 0
5 1 2 1 1
10 1 3 2 2

Expected output:
9
Problem p00985 test case
Input:
3
0
01
10

Expected output:
3
Problem p00986 test case
Input:
(()())---)

Expected output:
0
0
1
1
3
4
3
1
1
2
Problem p00987 test case
Input:
3 2
1 2
2 3
3
1 2
1 3
2 3

Expected output:
Yes
1 2
2 3
Problem p00988 test case
Input:
4
10 0
20 10
10 30
0 10

Expected output:
300.00
Problem p00989 test case
Input:
3 3 1 2 3
.#.
###
.#.

Expected output:
10
Problem p00990 test case
Input:
5
5*57*
2
3 9

Expected output:
1
Problem p00991 test case
Input:
4 4 0 0 3 3

Expected output:
2
Problem p00992 test case
Input:
2
5
5

Expected output:
11
Problem p00993 test case
Input:
2

Expected output:
8
2
3
Problem p00994 test case
Input:
3 3
.1.
1.1
.1.

Expected output:
0
Problem p00995 test case
Input:
4 4
0 1 3
1 3 4
0 2 2
2 3 1
4
0 0
2 2
2 1
3 4

Expected output:
1
1
2
1
Problem p00996 test case
Input:
3 3
4o.
4o.
4o.

Expected output:
３
Problem p00997 test case
Input:
4
0 1 3
1 2 5
1 3 2

Expected output:
23
Problem p00998 test case
Input:
10 3
0
1
2
3
4
5
6
7
8
9
1 5 7
0 2 5
1 5 7

Expected output:
5
4
Problem p00999 test case
Input:
70 100 340 4 200
1 1 4
70 100 340 4 200
0 1 3
70 100 340 4 200
1 1 2
0 0 0 0 0

Expected output:
970
800
800
Problem p01000 test case
Input:
5
00000
01010
00000
00100
00000

00000
01010
00000
01010
00000

00000
00100
00000
01010
00000

00000
01010
00000
00100
00000

00000
00000
00100
00000
00000

1 2
2 3 4
4
01110
00100
00100
00100
01110

01110
10001
10000
10001
01110

11111
10001
11111
10000
10000

01110
10001
10000
10001
01110

00000
00000
00000
00000
00000

2 3 4
1 2
100
00100
01010
01110
10001
10001

01110
00100
00100
00100
01110

00000
00000
00000
00000
00000

11111
00010
00100
01000
11111

10001
10001
10001
10001
01110

5 1 3 5 7 9
5 0 2 4 6 8
0

Expected output:
Case 1:
00000
00000
01010
01110
10101

00000
10001
00000
00000
00000

00000
00000
11111
10001
00000

00000
00000
00000
00000
01010

00000
00000
01110
00100
11111

Case 2:
00010
10110
00000
11000
10000

00001
00000
10101
00010
00100

10001
00000
00000
00000
00010

01110
10001
00000
00001
10000

00000
00000
00111
01001
01000

Case 3:
00000
00000
00000
00000
00000

00000
00000
00000
00000
00000

00000
00000
00000
00000
00000

00000
00000
00000
00000
00000

00000
00000
00000
00000
00000
Problem p01001 test case
Input:
9 0 0 0
0 9 0 0
0 0 0 0
0 0 0 0
5
1 1 1 1 1
1000 500
10 10 10 10
10 10 10 10
10 10 10 10
10 10 10 10
5
1 0 2 0 1
1000 2000
3 8 6 10
0 1 6 8
10 2 4 7
8 6 6 8
19
2 2 0 2 2 0 2 1 0 1 2 0 1 2 0 1 0 2 2
200 100
-1 -1 -1 -1

Expected output:
0.3024000000
0.0000000000
0.5120000000
Problem p01002 test case
Input:
0
1 1 1 5 5
5 5 5 5 5
5 5 1 5 5
5 1 1 1 5
5 5 5 5 5
0 0 0 0 1
2
1 2 3 4 5
2 3 4 5 5
2 3 4 5 5
3 4 5 5 1
5 4 3 2 1
100 99 98 97 96
5
1 2 3 4 5
2 3 4 5 1
1 2 3 4 5
5 4 3 2 1
1 2 3 4 5
99 79 31 23 56
-1

Expected output:
17
2040
926
Problem p01003 test case
Input:
9 14 5 10
1 2 1
1 4 5
2 4 4
2 3 3
2 6 2
3 6 3
3 7 2
4 6 5
4 5 6
5 8 8
6 7 3
7 8 1
7 9 9
8 9 2
1 9
1
2
5
7
9
4 5 1 3
1 2 1
1 3 2
2 3 2
2 4 9
3 4 1
1 4
2
4 5 1 10
1 2 1
1 3 2
2 3 2
2 4 9
3 4 1
1 4
2
4 3 1 1
1 2 1
2 3 1
3 4 1
1 4
1
4 3 1 2
1 2 1
2 3 1
3 4 1
1 4
1
4 3 1 10
1 2 1
2 3 1
3 4 1
1 4
1
2 1 1 1
1 2 1
1 2
1
2 1 1 10
1 2 1
1 2
1
4 2 1 4
1 2 1
3 4 1
1 4
2
0 0 0 0

Expected output:
27
6
8
3
5
7
1
19
NA
Problem p01004 test case
Input:
3 4
10 75
50 5
90 75
50 50 10 10 2
40 90 1 1 3
10 20 10 15 1
50 70 50 50 4
4 2
25 25
25 75
75 75
75 25
50 50 10 10 1
50 50 15 15 2
1 1
5 5
1 1 1 1 1
0 0

Expected output:
5.442857
0.750000
1.000000
Problem p01005 test case
Input:
18 10
0
4 1
1 1
4 1
0
1 1
0
2 2
1 10
0
1 1
0
1 1
0
1 5
3 4 0
3 4 1
0
9 10
4 1
2 2
3 5 5
0
4 1
2 2
3 5 5
0
2 1
0 0

Expected output:
distance 10
distance 9
hit
damage 2
bomb 1
bomb 2
end
distance -1
miss
bomb 0
distance 10
miss
bomb 1
hit
end
Problem p01006 test case
Input:
ABCFI
ABCABCABC
AEI
EFC
（中略）
DEHED
EEEEE
（以上でちょうど1000個）

Expected output:
ABCFI
EFC
（中略）
DEHED
Problem p01007 test case
Input:
3 1
1 1 0
0 1 1
1 0 1
0 2 2 2 90

Expected output:
1 1 0
0 0 1
1 1 1
Problem p01008 test case
Input:
1
10 1

Expected output:
win
Problem p01009 test case
Input:
3 5
COMPARE 1 2
IN 1 2 5
IN 2 3 3
COMPARE 2 3
COMPARE 1 3

Expected output:
WARNING
3
11
Problem p01010 test case
Input:
1
90 10 20
3 3 1 90 10 315 10
6 0 1

Expected output:
30
Problem p01011 test case
Input:
3 3
0 0 0
0 18 0
0 0 0

Expected output:
16
Problem p01012 test case
Input:
1 1 1
1 1 1

Expected output:
0.562500
Problem p01013 test case
Input:
0 0 10
0 0 0 4
0 0 1

Expected output:
91.769438 75.782170
Problem p01014 test case
Input:
5 5 2
#####
#S.G#
#...#
#...#
#####

Expected output:
4
Problem p01015 test case
Input:
10 2
9 left : 9 left
9 right : 9 right

Expected output:
9
Problem p01016 test case
Input:
ABCDE
ABC

Expected output:
Yes
Problem p01017 test case
Input:
4 4
10 2 -1 6
8 1 -100 41
22 47 32 11
-41 99 12 -8
1 0 0 1
0 0 1 0
0 1 0 1
0 0 1 0
2 3
1 0 1
0 1 0

Expected output:
193
Problem p01018 test case
Input:
10 3
2 2 1
4 2 1
8 1 1

Expected output:
8
Problem p01019 test case
Input:
4
1 1 1 5
3 3 5 3
4 2 4 4
7 1 7 5

Expected output:
2
Problem p01020 test case
Input:
4
1 2 3 4

Expected output:
11
Problem p01021 test case
Input:
1 2
18
6 9

Expected output:
1
Problem p01022 test case
Input:
3
1 1
2 2
3 3

Expected output:
1
Problem p01023 test case
Input:
5 8 3
#.......
#.####2#
#.#.3..#
#.######
.1Sabcde

Expected output:
14
Problem p01024 test case
Input:
1 1 9

Expected output:
9
Problem p01026 test case
Input:
7
1
2
3
4
5
6
7
1 2
1 3
3 4
3 5
5 6
5 7
10
0 1 7
0 2 7
1 1 15
0 1 7
0 2 7
0 1 1
1 1 -15
0 1 7
0 2 7
0 1 1

Expected output:
16
18
31
33
16
16
18
1
Problem p01027 test case
Input:
3
frence 1
usi 1
powland 1
2
usi 0 frence 0 10
frence 0 powland 0 10
2
usi 0
powland 0

Expected output:
20
usi 0 frence 0
frence 0 powland 0
-----
Impossible
-----
Problem p01028 test case
Input:
1 10
1 2 3 4 5 6 7 8 9 10

Expected output:
0
Problem p01029 test case
Input:
3 3
c ? ?
0 1
0 2
1 2

Expected output:
cab
Problem p01030 test case
Input:
2 2
S.
.G
1
3
##
##

Expected output:
2
Problem p01031 test case
Input:
6 25 3
8 5 1 1 2 6

Expected output:
1
Problem p01032 test case
Input:
6 3
4
4
5

Expected output:
Alice
Problem p01033 test case
Input:
3 3
3
0 0
1 1
2 2
2
1 0
2 1
3
1 1
2 2
0 1
2
1 0
2 0

Expected output:
2 0 0
Problem p01034 test case
Input:
3 2 -3
0 1 1
0 2 5

Expected output:
-2
Problem p01035 test case
Input:
3
1 2 3
3
0 2 2
0 2 4
0 0 2

Expected output:
0
1
1
Problem p01036 test case
Input:
1 2 2 1
4 1
0 0
2 0
2 2
0 2

Expected output:
0.2500000000
Problem p01037 test case
Input:
5 3
0 1
2 1
3 1

Expected output:
2 1
1 1
Problem p01038 test case
Input:
5 1 2 3 4 3

Expected output:
0 0 0 1 0
Problem p01039 test case
Input:
2 5
1 1
2 1

Expected output:
3
Problem p01040 test case
Input:
2015 3 13 2015 3 13

Expected output:
1
Problem p01041 test case
Input:
3
apple
app
banana
9
1 1
3 1
3 2
3 3
2 1
1 2
3 1
3 2
3 3

Expected output:
1
1
-1
-1
2
-1
Problem p01042 test case
Input:
2 5 3 3 11

Expected output:
3
Problem p01043 test case
Input:
3 1
4
0 4
2 4
2 7
0 7
1 6
5
1 0
6 0
4 5
2 2
1 4
4 2
3
2 6
6 4
6 7
5 6

Expected output:
14.6502815399
Problem p01044 test case
Input:
3 3
RGR
RBP
YEB
1
1 1

Expected output:
…
YBG
EBP
Problem p01045 test case
Input:
3 3 2
...
...
...

Expected output:
Chieno
Problem p01046 test case
Input:
3 3 1 10
@0.
...
...
0 100

Expected output:
100
Problem p01047 test case
Input:
2 1
1 2
5 0 0

Expected output:
3
Problem p01048 test case
Input:
1

Expected output:
1
Problem p01049 test case
Input:
5
2 3
3
0 2 5
0 3 5
1 2 4
2

Expected output:
11
Problem p01050 test case
Input:
0ig3he12fz99

Expected output:
9
Problem p01051 test case
Input:
5 5
S....
.....
.....
.....
....G

Expected output:
14
Problem p01052 test case
Input:
4
1 31
2 2
2 3
3 3

Expected output:
1700
Problem p01053 test case
Input:
6 3 1 10
0 1 0
0 2 0
0 3 0
1 3 3
0 2 1
2 2 2
2 3 2
2 2 0
1 1 1
2 2 1

Expected output:
1
3
9
9
0
3
9
3
1
0
Problem p01054 test case
Input:
3
abc
xyz

Expected output:
0
Problem p01055 test case
Input:
2 2 1
2 1
3 1 1 1 2 2 2

Expected output:
1
Problem p01056 test case
Input:
3 1
0 4

Expected output:
27
Problem p01057 test case
Input:
2 1
abcd
efgh
1 1 2 2 3

Expected output:
agh
efbcd
Problem p01058 test case
Input:
2 2 0 0 0 1

Expected output:
0
Problem p01059 test case
Input:
3 2
1 3

Expected output:
1
Problem p01060 test case
Input:
11 11
5
0 0 0 0 0

Expected output:
0
Problem p01061 test case
Input:
3 1
1 2

Expected output:
0
Problem p01062 test case
Input:
4 1 4
1 2
2 3
3 4

Expected output:
Yes
Problem p01063 test case
Input:
3
0 0 0
1 2 2

Expected output:
3
Problem p01064 test case
Input:
4
2 1
3
0 1 2
1 1 4
2 2 4
3

Expected output:
2
Problem p01065 test case
Input:
3
3 3
3 2 4 1
5 1 2 1
3 1 3 2

Expected output:
3
Problem p01066 test case
Input:
3
0 0
0 1
1 0

Expected output:
2
Problem p01067 test case
Input:
3
0 0 2
3 3 1
6 1 1

Expected output:
1
Problem p01068 test case
Input:
2 1
0 0 1
0 1 0
0

Expected output:
2
Problem p01069 test case
Input:
3 3 1
1 2 3
3 1 2
3

Expected output:
6
Problem p01070 test case
Input:
rupcrupc 5
0 3 rupc
0 7 rupc
2 7 ru
2 7 pc
1 5 u

Expected output:
1
2
1
2
2
Problem p01071 test case
Input:
5 4
5
1 1 3 3
3 2 4 2
4 3 5 4
1 4 5 4
4 1 4 1

Expected output:
9
9
13
13
14
Problem p01072 test case
Input:
3 3 3
5
2 0 0
0 1 0
1 1 1
1 2 1
2 2 0
0 0 0
0 1 0
0 0 0

Expected output:
1
Problem p01073 test case
Input:
5 100 3
2 3 4 5 6
50 40 20 10 5

Expected output:
280
Problem p01074 test case
Input:
3 7 3
0 1 1 1
0 1 1 2
1 1 3 4
1 1 1 1
1 2 1 2
2 1 1 3
2 2 2 1

Expected output:
9
Problem p01075 test case
Input:
3 2
1 2 10
2 3 20

Expected output:
20
Problem p01076 test case
Input:
4 3

Expected output:
3
Problem p01077 test case
Input:
1 10
o........@

Expected output:
yes
Problem p01078 test case
Input:
5 2

Expected output:
1.12256994
Problem p01079 test case
Input:
5 4 40
0 1 1 1 0
1 2 5
2 3 5
3 4 5
4 5 5

Expected output:
6
Problem p01080 test case
Input:
2
1 2

Expected output:
1
1
Problem p01081 test case
Input:
acca

Expected output:
0
Problem p01082 test case
Input:
20 10 1
0 0

Expected output:
28
Problem p01083 test case
Input:
2
3 3 2
8 3 2
0 3
3 7
8 0
8 7

Expected output:
13.8190642862
Problem p01084 test case
Input:
1
0111f

Expected output:
1
0111f
Problem p01085 test case
Input:
5 2 4
100
90
82
70
65
5 2 4
100
90
80
75
65
3 1 2
5000
4000
3000
4 2 3
10000
10000
8000
8000
4 2 3
10000
10000
10000
8000
5 2 3
100
80
68
60
45
0 0 0

Expected output:
3
4
2
2
3
2
Problem p01086 test case
Input:
9
do
the
best
and
enjoy
today
at
acm
icpc
14
oh
yes
by
far
it
is
wow
so
bad
to
me
you
know
hey
15
abcde
fghijkl
mnopq
rstuvwx
yzz
abcde
fghijkl
mnopq
rstuvwx
yz
abcde
fghijkl
mnopq
rstuvwx
yz
0

Expected output:
1
2
6
Problem p01087 test case
Input:
1
9
4
+
.1
.2
.3
9
+
.0
.+
..*
...1
...*
....1
....2
..0
10
+
.+
..6
..2
.+
..1
..*
...7
...6
.3
0

Expected output:
9
6
2
54
Problem p01088 test case
Input:
4
800
700
1600
600
4
300
700
1600
600
4
300
700
1600
650
3
1000
2000
500
3
250
250
1000
4
1251
667
876
299
0

Expected output:
2 2900
3 2500
3 3250
1 500
3 1500
3 2217
Problem p01089 test case
Input:
11
01u12u0123u
6
01u10u
8
201u210u
9
01u12u20u
3
77u
12
9u8u845u954u
0

Expected output:
SAFE
UNSAFE
SAFE
UNSAFE
UNSAFE
UNSAFE
Problem p01090 test case
Input:
4 5 2
1 2 2 A
1 3 2 A
1 4 2 A
2 3 1 B
3 4 1 B
5 8 2
1 2 1 A
2 3 1 A
3 4 3 A
4 5 3 A
1 2 5 B
2 3 5 B
3 4 8 B
4 5 8 B
5 5 1
1 2 1 A
2 3 1 A
3 4 1 A
4 5 1 B
3 5 1 B
4 5 3
1 2 2 A
2 4 3 B
3 4 4 B
2 3 5 A
3 1 6 A
0 0 0

Expected output:
5
16
-1
-1
Problem p01091 test case
Input:
4
0 0
10 0
10 5
0 5
3
5 0
17 3
7 10
4
0 5
5 0
10 0
7 8
4
0 0
40 0
50 5
0 5
4
0 0
10 0
20 5
10 5
7
4 0
20 0
24 1
22 10
2 10
0 6
0 4
18
728 997
117 996
14 988
1 908
0 428
2 98
6 54
30 28
106 2
746 1
979 17
997 25
998 185
999 573
999 938
995 973
970 993
910 995
6
0 40
0 30
10 0
20 0
40 70
30 70
0

Expected output:
23.090170
28.528295
23.553450
97.135255
34.270510
57.124116
3327.900180
142.111776
Problem p01092 test case
Input:
2
1 2 8
1 1 1
8 8 1
3 3 3 3 2
3
3 2 3
1 1 2
1 1 2
1 1 2
1 1 1 1 2
1 2 1 2 2
2 1 2 1 2
2
2 3 100
100 50 1
1 50 3
100 1 100 100 3
1 1 1 100 2
5
6 7 60
11 11 1
11 51 1
51 11 1
51 51 1
31 31 1
11 11 51 51 2
11 11 51 51 3
11 11 51 51 4
11 11 51 51 5
18 1 54 42 6
1 43 59 60 7
5
6 4 9
5 5 3
1 1 1
1 9 1
9 1 1
9 9 1
3 3 7 7 4
4 4 6 6 2
1 1 2 2 3
1 8 2 9 3
8 1 9 2 3
8 8 9 9 3
5
10 5 50
3 40 1
29 13 2
39 28 1
50 50 1
25 30 5
3 5 10 10 2
11 11 14 14 2
15 15 20 23 2
40 40 41 50 2
1 49 3 50 2
30 30 50 50 3
1 1 10 10 4
1 30 1 50 5
20 30 20 50 5
40 30 40 50 5
15
2 2 1000000
514898 704203 1
743530 769450 1
202298 424059 1
803485 898125 1
271735 512227 1
442644 980009 1
444735 799591 1
474132 623298 1
67459 184056 1
467347 302466 1
477265 160425 2
425470 102631 2
547058 210758 2
52246 779950 2
291896 907904 2
480318 350180 768473 486661 2
776214 135749 872708 799857 2
0

Expected output:
216
6
497
3181
1365
1930
6485356
Problem p01093 test case
Input:
5
10 10 10 10 10
5
1 5 8 9 11
7
11 34 83 47 59 29 70
0

Expected output:
0
1
5
Problem p01094 test case
Input:
1
A
4
A A B B
5
L M N L N
6
K K K K K K
6
X X X Y Z X
10
A A A B A C A C C B
10
U U U U U V V W W W
0

Expected output:
A 1
TIE
TIE
K 4
X 5
A 7
U 8
Problem p01095 test case
Input:
3 1
3 4
10 20
100 50
2 500000
0 0

Expected output:
4
11
47
150
7368791
Problem p01096 test case
Input:
4
1 2 3 4
4
1 2 3 1
5
5 1 2 3 6
14
8 7 1 4 3 5 4 1 6 8 10 4 6 5
5
1 3 5 1 3
0

Expected output:
4
4
2
12
0
Problem p01097 test case
Input:
1 1 100
100 100 100
6 4 10
100 100 100
106 102 102
112 110 104
104 116 102
100 114 104
92 107 100
10 4 10
-100 101 100
-108 102 120
-116 103 100
-124 100 100
-132 99 100
-92 98 100
-84 100 140
-76 103 100
-68 102 100
-60 101 100
10 4 10
100 100 100
108 101 100
116 102 100
124 100 100
132 102 100
200 100 103
192 100 102
184 100 101
176 100 100
168 100 103
4 4 10
100 100 100
108 94 100
116 100 100
108 106 100
23 6 10
100 100 100
96 109 100
100 118 100
109 126 100
118 126 100
127 118 98
127 109 104
127 100 97
118 91 102
109 91 100
111 102 100
111 102 109
111 102 118
111 102 91
111 102 82
111 114 96
111 114 105
102 114 114
93 114 114
84 114 105
84 114 96
93 114 87
102 114 87
10 3 10
100 100 100
116 116 102
132 132 104
148 148 106
164 164 108
108 108 108
124 124 106
140 140 104
156 156 102
172 172 100
0 0 0

Expected output:
60000
1856
-1
1632
1856
2796
1640
Problem p01098 test case
Input:
3 6
.#..#.
#.##.#
.#..#.
8 7
.#####.
#.....#
#..#..#
#.#.#.#
#..#..#
#..#..#
.#####.
...#...
3 3
#..
...
#..
3 3
#..
.#.
#..
3 3
...
...
...
3 3
...
.#.
...
3 3
.#.
#.#
.#.
3 3
.#.
###
.#.
7 7
.#####.
#.....#
#..#..#
#.#.#.#
#..#..#
#.....#
.#####.
7 7
.#####.
#.....#
#..#..#
#.#.#.#
#..#..#
#..#..#
.#####.
7 7
.#####.
#.....#
#..#..#
#.#.#.#
#..#..#
#.....#
.#####.
7 11
.#####.....
#.....#....
#..#..#..#.
#.#.#.#.#.#
#..#..#..#.
#.....#....
.#####.....
7 3
.#.
#.#
.#.
#.#
.#.
#.#
.#.
7 7
.#####.
#..#..#
#..#..#
#.#.#.#
#..#..#
#..#..#
.#####.
3 1
#
#
.
1 2
#.
0 0

Expected output:
yes
no
no
no
no
no
yes
yes
Problem p01099 test case
Input:
3 4
100 4
100 0
0 0
1 2 1.00
2 1 1.00
3 1 9.99
3 2 9.99
7 6
0 0
1 0
2 0
0 10
1 10
2 10
20 5
1 7 1.00
2 7 1.00
3 7 1.00
4 7 1.00
5 7 1.00
6 7 1.00
4 4
-1 -1
1 -1
-1 1
1 1
1 4 1.10
4 2 2.10
2 3 3.10
3 1 4.10
8 12
-91 0
-62 0
-18 0
2 0
23 0
55 0
63 0
80 0
2 7 3.96
3 2 2.25
2 4 5.48
8 7 9.74
5 6 6.70
7 6 1.51
4 1 7.41
5 8 1.11
6 3 2.98
3 4 2.75
1 8 5.89
4 5 5.37
0 0

Expected output:
1.414214
0.816497
0.356001
5.854704
Problem p01100 test case
Input:
3 3
1 2
2 3
1 3
4 3
1 2
1 3
1 4
4 6
1 2
1 3
1 4
2 3
3 4
2 4
0 0

Expected output:
1 1
0 1
1 2
Problem p01101 test case
Input:
3 45
10 20 30
6 10
1 2 5 8 9 11
7 100
11 34 83 47 59 29 70
4 100
80 70 60 50
4 20
10 5 10 16
0 0

Expected output:
40
10
99
NONE
20
Problem p01102 test case
Input:
print"hello";print123
print"hello";print123
read"B1input";solve;output;
read"B2";solve;output;
read"C1";solve;output"C1ans";
read"C2";solve;output"C2ans";
""""""""
"""42"""""
slow"program"
fast"code"
"super"fast"program"
"super"faster"program"
X""
X
I"S""CREAM"
I"CE""CREAM"
11"22"11
1"33"111
.

Expected output:
IDENTICAL
CLOSE
DIFFERENT
CLOSE
DIFFERENT
DIFFERENT
DIFFERENT
CLOSE
DIFFERENT
Problem p01103 test case
Input:
3 3
2 3 2
2 1 2
2 3 1
3 5
3 3 4 3 3
3 1 0 2 3
3 3 4 3 2
7 7
1 1 1 1 1 0 0
1 0 0 0 1 0 0
1 0 1 1 1 1 1
1 0 1 0 1 0 1
1 1 1 1 1 0 1
0 0 1 0 0 0 1
0 0 1 1 1 1 1
6 6
1 1 1 1 2 2
1 0 0 2 0 2
1 0 0 2 0 2
3 3 3 9 9 9
3 0 0 9 0 9
3 3 3 9 9 9
0 0

Expected output:
0
3
1
9
Problem p01104 test case
Input:
4 3
110
101
011
110
7 1
1
1
1
1
1
1
1
4 5
10000
01000
00100
00010
6 6
111111
011000
100000
000010
100001
100100
0 0

Expected output:
3
6
0
6
Problem p01105 test case
Input:
0
(a*(1*b))
(1^a)
(-(-a*-b)*a)
(a^(b^(c^d)))
.

Expected output:
1
5
2
1
13
Problem p01106 test case
Input:
3 3 2
12 578 2214
59 471605241352156968 431565444592236940
0 0 0

Expected output:
LRR
RLLLRRRLRRLL
LRRRLRRLLRRRRLLLLRLLRRRLRRLLRLLLLLLRLRLLRLRLLLRLRLLRLLRRRLL
Problem p01107 test case
Input:
3 3
...
.#.
...
5 5
..#..
.....
#....
.....
.....
3 8
..#.....
........
.....#..
3 5
..#..
.....
..#..
4 4
....
....
..##
..#.
0 0

Expected output:
YES
NO
YES
NO
NO
Problem p01108 test case
Input:
0 1
2 2
1 0
1 3
5 2
4 3

0 0
0 1
1 0
0 3
0 2
1 -1

-5 -4
0 1
0 15
-10 14
-5 10
0 -8

-110 221
-731 525
-555 -258
511 -83
-1000 -737
66 -562

533 -45
-525 -450
-282 -667
-439 823
-196 606
-768 -233

0 0
0 1
1 0
99 1
100 1
55 2

354 -289
89 -79
256 -166
131 -196
-774 -809
-519 -623

-990 688
-38 601
-360 712
384 759
-241 140
-59 196

629 -591
360 -847
936 -265
109 -990
-456 -913
-787 -884

-1000 -1000
-999 -999
-1000 -998
1000 1000
999 999
1000 998

-386 -83
404 -83
-408 -117
-162 -348
128 -88
296 -30

-521 -245
-613 -250
797 451
-642 239
646 309
-907 180

-909 -544
-394 10
-296 260
-833 268
-875 882
-907 -423

Expected output:
4
3
3
3
3
4
4
4
4
Many
Many
Many
Many
Problem p01109 test case
Input:
7
15 15 15 15 15 15 15
4
10 20 30 60
10
1 1 1 1 1 1 1 1 1 100
7
90 90 90 90 90 90 10
7
2 7 1 8 2 8 4
0

Expected output:
7
3
9
1
4
Problem p01110 test case
Input:
2 1 1 1
1 1
0 0
1 3 2 1
2 1
2 1
0 0
10 8 3 2
2 2
1 3
1 1
0 1
3 4
3 3 3 2
1 2
2 1
1 1
0 1
0 0
0 0 0 0

Expected output:
2
3
8
1
3
6
Problem p01111 test case
Input:
15
16
2
3
9699690
223092870
847288609
900660121
987698769
999999999
0

Expected output:
1 5
16 1
2 1
1 2
16 4389
129 20995
4112949 206
15006 30011
46887 17718
163837 5994
Problem p01112 test case
Input:
5
3
3 2
4 1
5 1
3
1
1 2
3
2
1 2
3 2
5
4
4 1
4 2
5 1
5 2
5
3
4 1
4 2
5 1
5
4
3 2
4 1
5 1
5 2
9
11
6 1
6 4
7 2
7 3
7 4
8 2
8 3
8 4
9 1
9 3
9 5
9
10
6 1
6 4
7 2
7 3
7 4
8 2
8 3
8 4
9 1
9 3
5
6
4 3
2 1
5 1
2 4
1 3
2 3
9
1
1 2
0

Expected output:
2
1
0
0
1
0
0
16
0
1615040
Problem p01113 test case
Input:
1
0000000000000000000000000000000000000000000000000000
2
0000000000000000000000000000000000000000000000000000
3
0000000000000000000000000000000000000000000000000000
4
0000000000000000000000000000000000000000000000000000
7
1101000000000000000000000000000000000000000000000000
100
1100011010100001100111100101000111001001111100101011
123456789
1010101010101010101010101010101010101010101010101010
1000000000000000000
1111111111111111111111111111111111111111111111111111
0

Expected output:
0000000000010000000000000000000000000000000000000000000000000000
0000000000011000000000000000000000000000000000000000000000000000
0000000000100000000000000000000000000000000000000000000000000000
0000000000100100000000000000000000000000000000000000000000000000
0000000000111101000000000000000000000000000000000000000000000000
0000000001110110011010111011100001101110110010001001010101111111
0000000110111000100001110101011001000111100001010011110101011000
0000001101010000000000000000000000000000000000000000000000000000