alexjercan/bugnet huggingface dataset:
Problem p01359 test case
Input:
4 3
meiji 10 1877
taisho 6 1917
showa 62 1987
heisei 22 2010
1868
1917
1988
1 1
universalcentury 123 2168
2010
0 0

Expected output:
meiji 1
taisho 6
Unknown
Unknown
Problem p01360 test case
Input:
1
12
123
369
6748
4247219123
1232123212321232
#

Expected output:
0
0
1
0
1
2
7
Problem p01361 test case
Input:
1 10
3 3
AAA
ABA
CCC
3
A 0
B 5
C 9
3
D 2
R 1
U 2
5
10
10
10
10
10
100 100
10 10
THISISAPEN
THISISAPEN
THISISAPEN
THISISAPEN
THISISAPEN
THISISAPEN
THISISAPEN
THISISAPEN
THISISAPEN
THISISAPEN
8
T 0
H 1
I 2
S 3
A 4
P 5
E 6
N 7
9
R 1
D 3
R 8
D 2
L 9
D 2
R 9
D 2
L 9
2
20
10
0 0

Expected output:
YES
NO
Problem p01362 test case
Input:
...
...
.*.
...
...
.*.
...
...
...
...
...
.*.
...
...
.*.
...
...
...

...
.*.
...
*..
...
..*
*.*
*.*
*.*
*.*
.*.
*.*
*..
.*.
..*
*.*
...
*.*

...
.*.
.*.
...
.**
*..
...
...
.*.
.*.
...
*..
..*
...
.**
...
*..
...

#

Expected output:
3
1
0
Problem p01363 test case
Input:
1
1 1
4 -1 0 -2 -1 -1 -2 0 -1
1
0 3
4 1 1 1 2 -1 2 -1 1
1
-6 -6
6 1 -2 2 -2 2 3 -2 3 -2 1 1 1
1
-10 0
4 0 -5 1 -5 1 5 0 5
1
10 1
4 5 1 6 2 5 3 4 2
2
-47 -37
4 14 3 20 13 9 12 15 9
4 -38 -3 -34 -19 -34 -14 -24 -10
0

Expected output:
1.00000000
0.00000000
3.23606798
5.00000000
1.00000000
11.78517297
Problem p01364 test case
Input:
1 1
180 90 2
1 1
180 180 20
2 10
360 -360 5
-90 360 8
3 2
100 60 9
-72 -72 10
-45 -225 5
0 0

Expected output:
3.00000
3.00000
0.00000
62.83185
12.00000
0.00000
-2.44505
13.12132
Problem p01365 test case
Input:
2
0 0
2
-5 5 0
5 5 10
1
0 6
2
5 5 0
-5 5 10
1
6 10
1
7 -65
2
-65 10 0
65 1 3
2
0 1
23 24
2
0 0
2
100 10 0
-10 10 10
5
0 1
2 3
4 5
6 7
8 9
2
10 0 0
0 10 10
5
1 2
3 4
5 6
7 8
9 10
0

Expected output:
9.00000000
2.00000000
5.98862017
Problem p01366 test case
Input:
3 3
1 2 1 2
2 3 2 1
3 1 3 2
5 5
1 2 2 2
2 3 1 1
1 4 1 1
4 5 1 1
5 3 1 1
5 10
1 2 32 10
1 3 43 43
1 4 12 52
1 5 84 23
2 3 58 42
2 4 86 99
2 5 57 83
3 4 11 32
3 5 75 21
4 5 23 43
5 10
1 2 1 53
1 3 1 65
1 4 1 24
1 5 1 76
2 3 1 19
2 4 1 46
2 5 1 25
3 4 1 13
3 5 1 65
4 5 1 34
0 0

Expected output:
3
5
137
218
Problem p01367 test case
Input:
3 300
100 50 150
100 50 150
100 50 150
3 300
100 50 150
100 50 150
200 50 150
9 18
3 1 1
3 1 1
3 1 1
4 100 1
5 100 1
5 100 1
10 5 3
10 5 3
1 7 1000
10 18
1 2 3
2 3 4
3 4 5
4 5 6
5 6 7
6 7 8
7 8 9
8 9 10
9 10 11
10 11 12
0 0

Expected output:
2
3
3
4
Problem p01368 test case
Input:
3 2 3
0 1 10
1 2 10
0 0
1 10
2 0
3 2 4
0 1 10
1 2 10
0 0
1 10
2 20
0 40
10 10 10
0 1 39
2 3 48
3 5 20
4 8 43
3 9 10
8 9 40
3 4 5
5 7 20
1 7 93
1 3 20
0 0
1 100000000
2 100
3 543
4 500
5 400
6 300
7 200
8 100
9 100
0 0 0

Expected output:
2
1
4
Problem p01388 test case
Input:
KUPCkupcKUPC

Expected output:
2
Problem p01389 test case
Input:
3 3
023
321
120

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

Expected output:
01010101
Problem p01392 test case
Input:
18 2

Expected output:
4
Problem p01393 test case
Input:
2 1
10 10 10
-10 10 10

Expected output:
0.50
Problem p01395 test case
Input:
1 100
1 1 1

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

Expected output:
YES
Problem p01397 test case
Input:
5 5
0 2 0 2 0
2 0 0 0 2
0 0 0 0 0
2 0 0 0 2
0 2 0 2 0

Expected output:
5
Problem p01398 test case
Input:
1
tojxo
1 4
5
uhcqmlmkv
4 5
6 9
3 6
1 7
3 6
5
shzxadexonr
8 9
3 9
5 8
4 9
10 11
0

Expected output:
aojwo
shinryaku
shitadegeso
Problem p01399 test case
Input:
3 100
3 7 4
5 24
4 6 12 3 8
5 1
1 1 2 2 3
0 0

Expected output:
2
4
5
Problem p01400 test case
Input:
4 4
A B G
A B 40 3
B C 80 0
A G 40 0
B G 80 0
5 6
Kusatsu Tokyo Aizu
Tokyo Nagoya 120 3
Kusatsu Nagoya 40 0
Kusatsu Kanazawa 40 0
Kanazawa Aizu 40 0
Tokyo Kanazawa 40 0
Tokyo Aizu 80 4
0 0

Expected output:
5
4
Problem p01401 test case
Input:
10 10
S . . . . . . . . .
. . . . . . . . . .
. . . . 1 . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . 3 . .
. . . . . . . . . .
. . . . . 4 . . . .
. . . . . . . . . .
2 . . . . . . . . G
10 10
S . . . . . 3 . . .
. . 3 . . . . . . .
. . . . 1 . . . . .
. . . . . . 4 . . .
. . 3 . . . 1 . . .
. . . . . . . 3 . .
. . . . . . . . . .
. . . . . 4 . . . .
. . . . . 5 . . . .
2 . . . . . . . . G
10 10
S . . . . . . . . 1
. . . . . 5 . . . .
. 4 . . . . . . . .
. . . . 8 . 9 . . .
. . . . 10 . . . . .
. . 7 . G . . . . .
. . . 11 . . . . . .
3 . . . . . . . . 6
. . . . . . . 2 . .
. . . . . . . . . .
0 0

Expected output:
38
36
71
Problem p01402 test case
Input:
100 2 2 2
A 5 6
B 7 8
C 1 2
D 3 4
27 2 3 3
A 8 10
B 8 10
C 6 7
D 5 4
E 8 9
27 2 3 2
A 8 10
B 8 10
C 6 7
D 5 4
E 8 9
44 3 6 5
YamatoNoHito 9 10
ZettoNoHito 9 10
TMR 10 10
SkillNoGroup 8 10
NanaSama 6 9
FRPSD 6 8
Magi3rdDeshi 5 7
Magi13thDeshi 2 2
MagicalItoh 4 6
0 0 0 0

Expected output:
20
30
31
55
Problem p01403 test case
Input:
2
3
5

Expected output:
5
11
Problem p01404 test case
Input:
3 3
1 1 900
0 10 0
10 45 10
10 0 0
3
5 1 1
50 1 0
100 0 1
5 5
2 0 9000
0 0 4 0 0
0 3 3 3 0
2 2 2 2 2
0 0 1 0 0
0 0 1 0 0
4
5 2 0
10 2 1
100 2 2
250 2 3
0 0

Expected output:
5
5
8
30
5
13
4
Problem p01405 test case
Input:
4
2 1
0 1 a
2 2
0 1 a
0 1 b
5 5
0 1 a
0 2 b
1 3 a
2 3 c
3 4 e
3 3
0 1 aa
0 2 bce
1 2 a
2 4
0 1 abc
0 1 def
0 1 ghi
0 1 jkl
2 4
0 1 ghi
0 1 jkl
0 1 mno
0 1 pqr
6 7
0 1 haru
0 1 natsu
1 2 wa
2 3 ake
2 4 saron
3 5 bono
4 5 pusu
5 4
0 1 haruw
1 2 aakeb
2 3 o
3 4 no

Expected output:
1
1
2
1
Problem p01406 test case
Input:
3
3
17 12 7 340 180
26 22 10 150 270
27 13 5 100 230
3
0 0 8 0 90
10 10 8 180 0
50 50 5 180 270
2
10 10 5 0 270
0 0 30 0 90

Expected output:
3
2
2
Problem p01407 test case
Input:
3 10 150 250
100 20 123
201 10 67
202 10 45

Expected output:
190
Problem p01408 test case
Input:
4 3
1 2
1 3
1 4

Expected output:
3
1
Problem p01409 test case
Input:
ICPC
CPCPC

Expected output:
10
Problem p01410 test case
Input:
3
10 40
10 40
20 30

Expected output:
80
Problem p01411 test case
Input:
9 4 3 2 1
2 1
7 3

Expected output:
0.571428571
Problem p01412 test case
Input:
4
7
5
10
6

Expected output:
5
6
7
10
Problem p01413 test case
Input:
2 2 100 20
alfalfa 10 10
carrot 5 10
1 1 6
carrot 4
1 -3 0
alfalfa 5

Expected output:
170
Problem p01414 test case
Input:
2
4 4
1 1
RRRR
RRGR
RBRR
RRRR

Expected output:
3
Problem p01415 test case
Input:
1 1 1 2 3 100
50

Expected output:
49.500000000
Problem p01416 test case
Input:
5 10
..A.......
.......B..
..........
..B.......
..A.CC....

Expected output:
4
Problem p01417 test case
Input:
3 2
0 0 0
10 10 10
100 100 100

Expected output:
30000.00000000000000000000
Problem p01418 test case
Input:
3 0 2
0.10000000000
0.50000000000
1.00000000000

Expected output:
0.900000
Problem p01419 test case
Input:
1 3 2
...
1 1 1
1 2 1
1 1 1
0 0
0 2

Expected output:
7
Problem p01420 test case
Input:
2 2 50
30 50 1
30 50 2

Expected output:
0.28770000
0.71230000
Problem p01421 test case
Input:
2 1
2 1
2 1

Expected output:
1
0
Problem p01422 test case
Input:
3
6 11 12

Expected output:
0.090909090909
Problem p01423 test case
Input:
3 3
1 2 3
2 3 1
3 1 2

Expected output:
6
Problem p01424 test case
Input:
2 2
ab
ba
1 1
1 2

Expected output:
4
Problem p01425 test case
Input:
0 7 3 1

Expected output:
Yes
Problem p01426 test case
Input:
2 3
1.0 1.0
-1.0 0.0
0.5 0.5

Expected output:
1.0
Problem p01427 test case
Input:
3 5
##..#
#..##
####.

Expected output:
4
Problem p01428 test case
Input:
ooox....
.x......
ooo.....
........
........
........
........
........

Expected output:
ooooo...
.o......
ooo.....
...o....
....o...
........
........
........
Problem p01429 test case
Input:
4 5 99
1 4 5 3
100 200 300 400 500

Expected output:
37
Problem p01430 test case
Input:
2 1 2
1 2
2 1 2
1 2 1

Expected output:
0
1
Problem p01431 test case
Input:
3 4
.##.
#??#
.#?#

Expected output:
8
Problem p01432 test case
Input:
6 6 1

Expected output:
6.00000000
Problem p01433 test case
Input:
4 5 25
0 10
10 0
20 0
30 10

Expected output:
Red
Problem p01434 test case
Input:
2 3
1 8
20 5
3
7
15

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

Expected output:
2
Problem p01436 test case
Input:
4 4
.S..
K...
....
..sk

Expected output:
9
Problem p01437 test case
Input:
3 3 10
E..
.#.
...
5 5 19
####.
.....
.#S#.
...#.
#.##.
5 5 6
#.#..
#....
##.#.
#..S.
#....
5 4 35
..##
....
.##.
.#S.
...#
0 0 0

Expected output:
1 3 E
4 5 S
4 4 E
1 1 N
Problem p01438 test case
Input:
2
2 100
10 12
14 16
2 200
12 13
18 20
4
1 100
6 22
1 1000
6 22
1 10000
6 22
1 100000
6 22
16
1 100000000
6 7
1 100000000
7 8
1 100000000
8 9
1 100000000
9 10
1 100000000
10 11
1 100000000
11 12
1 100000000
12 13
1 100000000
13 14
1 100000000
14 15
1 100000000
15 16
1 100000000
16 17
1 100000000
17 18
1 100000000
18 19
1 100000000
19 20
1 100000000
20 21
1 100000000
21 22
0

Expected output:
300
100000
1600000000
Problem p01439 test case
Input:
6
onetwo2
-
onetwo1
onetwo2
-
onetwo1
7
v
topbottom2
onetwo2
-
onetwo1
topbottom1
-
6
baz2
foo2
baz1v
bar2
foo1
bar1
0

Expected output:
2
3
1
5
6
4
4
5
3
6
2
1
7
5
2
6
4
3
1
Problem p01440 test case
Input:
45678
67891011
21
314159265358979
#

Expected output:
4
6
15
2012778692735799
Problem p01441 test case
Input:
a
QMAClone
acmicpc
abcdefgha
abcdefgdhbi
abcbcd
#

Expected output:
No Results
9
7
9
12
6
Problem p01442 test case
Input:
2 2 1
L
G.
#S
2 2 2
RR
G.
.S
3 3 6
LLLLLL
G#.
...
.#S
0 0 0

Expected output:
Yes
No
Yes
Problem p01443 test case
Input:
1 10 1000
1 100000 1000000000
999999999 1000099998 1000000000
0 0 0

Expected output:
513
899507743
941554688
Problem p01444 test case
Input:
1
1 1
10 -480
2
6 7
5 5
4 1
3
10 5
4 4
8 4
2 0
0

Expected output:
Yes
Yes
No
Problem p01445 test case
Input:
3 3
1 2 x+2
2 3 2x+1
3 1 x+1
2 0
3 2
1 2 x
2 3 2
4 3
1 2 x^3+2x^2+3x+4
2 3 x^2+2x+3
3 4 x+2
0 0

Expected output:
2x+3
0
2
x+2
Problem p01446 test case
Input:
2
5
0 0
10 0
20 0
30 0
30 10
4
1 2
2 3
3 4
4 5
2
1 2 4
3 2 2
5
-10 0
0 0
0 -10
0 -20
0 -30
4
1 2
2 3
3 4
4 5
1
4 1 3
1 1
2 1
4
3
4 3
0 0
5 0
2
1 2
2 3
0
3
0 0
3 4
0 5
2
1 2
1 3
1
2 3 4
4
0 13
0 0
13 0
13 13
4
1 2
1 4
2 3
2 4
0
4
5 12
0 0
-7 17
-12 5
4
1 2
2 3
2 4
4 3
0
1 1
4 1
4
3
0 0
2 0
0 4
2
1 2
1 3
0
3
0 0
-2 0
0 4
2
1 2
1 3
1
1 4 1
3
0 0
1 0
0 2
2
1 2
1 3
1
1 4 1
3
0 0
2 0
0 4
2
1 2
2 3
0
1 1
4 1
0

Expected output:
10.0000000000
41.3847763109
-1.000000000
Problem p01447 test case
Input:
8

Expected output:
2
Problem p01448 test case
Input:
4
2 5
4 7
2 4
3 6

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

Expected output:
3
Problem p01450 test case
Input:
4 8
1
2
7
9

Expected output:
2
Problem p01451 test case
Input:
2 2
0 0
1 1
2 0
2 -1

Expected output:
2.414213562373
Problem p01452 test case
Input:
6 4 0

Expected output:
210
Problem p01453 test case
Input:
8 6
########
#..##g.#
#*#.*#.#
#......#
#*s#*.*#
########

Expected output:
5.857142857143
Problem p01454 test case
Input:
4 3 12
3 6
2 4
7 9
10 1
6 5
8 4
15 19

Expected output:
2
Problem p01455 test case
Input:
4 3
huda
leide
loar
sheza
huda leide
leide loar
loar sheza

Expected output:
10
Problem p01456 test case
Input:
6 5
7
14
5
11
2
5
1 2
2 3
3 4
4 5
5 6

Expected output:
2
Problem p01457 test case
Input:
3
0 ( 10
10 ) 5
10 ) 5

Expected output:
No
No
Yes
Problem p01458 test case
Input:
2 10 2
hello
world

Expected output:
helloworld
Problem p01459 test case
Input:
3 3 2
S#.
...
.#G

Expected output:
2
Problem p01460 test case
Input:
2 1 3 6 12 1 2 1 2
WR 1 1 1

Expected output:
676573821
Problem p01461 test case
Input:
4
2 3
4 4
4 4

Expected output:
6
Problem p01462 test case
Input:
3 3 50
1 2
2 3
3 1

Expected output:
0.500000000000
Problem p01463 test case
Input:
2
0 0
15 0
5 0 1
10 10 2

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

Expected output:
Yes
Problem p01465 test case
Input:
(x1&x2)

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

Expected output:
4
Problem p01467 test case
Input:
99 98 1

Expected output:
1
Problem p01468 test case
Input:
4
2 0 2 25
0 30 15 20
16 20 5 15
23 0 23 30

Expected output:
0.41380294
Problem p01469 test case
Input:
3
25 125 5

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

Expected output:
-14
Problem p01471 test case
Input:
1 1
3 1

Expected output:
0.333333
Problem p01472 test case
Input:
2 0
1 3
1 1

Expected output:
Second
3
Problem p01473 test case
Input:
ab

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

Expected output:
2
Problem p01475 test case
Input:
1
1 0 1 0 0 -1
1 -1 0

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

Expected output:
YES
Problem p01477 test case
Input:
2 1
1 -2

Expected output:
3
Problem p01478 test case
Input:
3
0 1 3
1 0 8
3 8 0

Expected output:
5
Problem p01479 test case
Input:
eggchickenegg

Expected output:
egg
Problem p01480 test case
Input:
2
4 2
4 0.4000000
3 0.5000000
4 1
5 0.3333333
5 3
5 0.7777777
4 0.1111111
2 0.0001111

Expected output:
YES
Problem p01481 test case
Input:
10 10
.....#....
.....#....
.....#....
######....
..........
####......
....###...
t..#..####
...##.....
....#...##
3
0 3
0 5
4 6

Expected output:
2
Problem p01482 test case
Input:
100
A=malloc(10)
B=clone(A)
free(A)

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

Expected output:
8
Problem p01484 test case
Input:
5 3 2
aaaaa
aaa
aab

Expected output:
1 6
Problem p01485 test case
Input:
2
0 0 5 0 10
1 0 6 0 10
1
0.000000 0.000000
6.000000 0.000000

Expected output:
2
Problem p01486 test case
Input:
mmemewwemeww

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

Expected output:
11
Problem p01488 test case
Input:
2 10
Warsaw Petersburg
3
Kiev Moscow Petersburg
150 120
3
Moscow Minsk Warsaw
100 150

Expected output:
380 1
Problem p01489 test case
Input:
5

Expected output:
5
Problem p01490 test case
Input:
4
5
8
58
85

Expected output:
2970.000000000
Problem p01491 test case
Input:
2 3 1 3 1 0

Expected output:
2
Problem p01492 test case
Input:
4

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

Expected output:
Taro
Problem p01494 test case
Input:
3 3 1
0 0

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

Expected output:
18
Problem p01496 test case
Input:
3 40
.a....a....a....a....f....f....f....f...
#bc#.#cd#.#de#.#eb#.#cb#.#dc#.#ed#.#be#.
.#....#....#....#....#....#....#....#...

Expected output:
Yes
Problem p01497 test case
Input:
4 4 4 4
4 4 4 4
4 4 4 4
4 4 4 4

Expected output:
1
Problem p01498 test case
Input:
4 3 3
1 1
1 3
3 1
3 3

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

Expected output:
4
Problem p01500 test case
Input:
6 3 1.0
1 2 3
4 5 6
0 0
1 0
2 0
0 1
1 1
2 1

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

Expected output:
2.0000000000
Problem p01502 test case
Input:
3
0 2 7
2 0 4
5 8 0

Expected output:
11
Problem p01503 test case
Input:
1 1 1 1 1

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

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

Expected output:
Case 1: 1
Case 2: 13
Problem p01506 test case
Input:
0 1000 10
1 1000 10
0 0 0

Expected output:
Case 1: 1
Case 2: 10
Problem p01507 test case
Input:
2 2
..
..
3 3
...
...
..#
0 0

Expected output:
Case 1: 4
Case 2: 56
Problem p01508 test case
Input:
4
0 0
10 0
10 10
0 10
3
0 0
1 0
0 1
0

Expected output:
Case 1: 14.142135624
Case 2: 1.41421356
Problem p01509 test case
Input:
C4C4G4G4A4A4G2F4F4E4E4D4D4C2
O4C4.C8F4.F8G8F8E8D8C2
B-8>C8<B-8V40R2R..R8.V100EV50L1CG
*

Expected output:
Case 1: CCGGAAG2FFEEDDC2
Case 2: C.C8F.L8FGFEDC2
Case 3: L8B-B+B-RL1RE4V50CG
Problem p01510 test case
Input:
2 1
1 3
0 1
1 0
3 3
1 2 4
0 2 0
2 0 1
0 1 0
0 0

Expected output:
Case 1:
0.75 0.25
Case 2:
1.5 1.5 0.0
Problem p01511 test case
Input:
2 4 1
2 1
2 2 1
2 2
0 0 0

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

Expected output:
Case 1:
3
2
3
Case 2:
2
2
2
Case 3:
2
2
2
2
2
2
2
2
2
3
Problem p01520 test case
Input:
2 10 2
3 4

Expected output:
2
Problem p01521 test case
Input:
oxxoxoo

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

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

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

Expected output:
1
3
4
0
1
3
5
7
11
19
29
46
47
48
Problem p01526 test case
Input:
5 3.000
1.000 0.000
0.000 0.000
-1.000 0.000
10.000 0.000
-10.000 0.000

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

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

Expected output:
9
Problem p01530 test case
Input:
5 5 3
0 1 7
1 2 22
2 3 128
3 4 128
4 2 128
0 1
0 0
3 4

Expected output:
135
128
128
Problem p01531 test case
Input:
5R2D

Expected output:
neko
Problem p01532 test case
Input:
3 0 0 100
4 0
3 0
3 0

Expected output:
2
Problem p01533 test case
Input:
3 4
S.M
...
...
M.G

Expected output:
9
Problem p01534 test case
Input:
1 5
2 3 8

Expected output:
10
Problem p01535 test case
Input:
1
index.dml
<dml><title>Markup language has Declined</title><br>Programmers world</dml>
1
15 3 0 index

Expected output:
Markup language
 has Declined..
Programmers wor
Problem p01536 test case
Input:
4
1 1 1 3 3 3 5 5 5 7 7 7 9

Expected output:
8
9
Problem p01537 test case
Input:
3 3
25 100 10
8
-10 0
-2 2
0 10
2 2
10 0
2 -2
0 -10
-2 -2
4
30 0
50 0
50 40
30 40
3
30 -10
45 -70
60 -10

Expected output:
3
1
2
Problem p01538 test case
Input:
3
9
99
123

Expected output:
0
2
3
Problem p01539 test case
Input:
0 0 0 2
0
2 2

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

Expected output:
3
Problem p01541 test case
Input:
100
2
1
2
0

Expected output:
201
Problem p01542 test case
Input:
000

Expected output:
0
Problem p01543 test case
Input:
3
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
1 1 1
o.o
...
.o.

Expected output:
2
2
1 3 erase
2 3 write
Problem p01544 test case
Input:
3
1
2
4

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

Expected output:
4
Problem p01546 test case
Input:
3 9 89
2 0 2
1 0 3
2 0 1
2 0 3
0 1 1
0 1 2
1 2 3
0 1 1
1 0 2

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

Expected output:
2
Problem p01548 test case
Input:
4 1
1 1 1
1 1 1
1 1 1
1 1 1

Expected output:
2.777777777778
Problem p01549 test case
Input:
1
a 1 10
3
10 a /

Expected output:
correct
Problem p01550 test case
Input:
2
1
2

Expected output:
36
Problem p01551 test case
Input:
1 0 1 0
3
dna: a b
a: [AT]
b: [GC]

Expected output:
1
Problem p01552 test case
Input:
.tweets.1
name: shimeji
id: shimejitan
tweets:
  1: shimejilove
  2: azupero

Expected output:
string "shimejilove"
Problem p01553 test case
Input:
3
-
U
D

Expected output:
1
Problem p01554 test case
Input:
4
abcd
efgh
ijkl
mnop
5
abcd
abcc
efgh
abcd
mnop

Expected output:
Opened by abcd
Unknown abcc
Closed by efgh
Opened by abcd
Closed by mnop
Problem p01555 test case
Input:
1

Expected output:
12Fizz4BuzzFizz78Fiz
Problem p01556 test case
Input:
4
100 100
0 100
0 0
100 0

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

Expected output:
2
Problem p01558 test case
Input:
5 4
abcde
R++
R++
L++
L--

Expected output:
3
Problem p01559 test case
Input:
3 0

Expected output:
6
Problem p01560 test case
Input:
2 15
3 5
50 50

Expected output:
3.75
Problem p01561 test case
Input:
6 6
######
#_|A%#
#B#_|#
#^BBa#
#B&A##
######
2
######
#*|*.#
#.#.|#
#*.**#
#...##
######
######
#*|*.#
#*#.|#
#..**#
#..*##
######

Expected output:
21
Problem p01562 test case
Input:
5
0 0
1 1
1 0
0 1
0 0

Expected output:
0.5
Problem p01563 test case
Input:
2 4
ACM
ICPC

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

Expected output:
6
3
-4
Problem p01565 test case
Input:
1 3
+++
6
5
4
3
2
1
1 3
1 1

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

Expected output:
2
Problem p01567 test case
Input:
((()())(((()())(()()))()))

Expected output:
3
Problem p01568 test case
Input:
1 2
0 0 10 0
1 0
9 0
0 0
5 0

Expected output:
9.0
Problem p01569 test case
Input:
9
2 1
1 -1
1 -1
1 -1
1 -1
0 1
0 1
0 1
0 1

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

Expected output:
4
Problem p01571 test case
Input:
1 5
qwerty asdf zxcv
qwert
asf
tyui
zxcvb
ghjk

Expected output:
3
Problem p01572 test case
Input:
2
8 -1 2 1 2 1 -3 2 -3 2 3 -2 3 -2 -3 -1 -3

Expected output:
22.6303
Problem p01573 test case
Input:
4
-2 0 0 0 2

Expected output:
4
-1 -i i 1
Problem p01574 test case
Input:
6 2
2
5

Expected output:
Yes
Problem p01575 test case
Input:
2 2 2

Expected output:
0
Problem p01576 test case
Input:
5 10
0 0
10 10
20 0
30 10
40 0

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

Expected output:
7.5
Problem p01578 test case
Input:
3
1 2 3

Expected output:
0
Problem p01579 test case
Input:
((()())())

Expected output:
10
Problem p01580 test case
Input:
2
1 0 0
0 1 0
40

Expected output:
1
Problem p01591 test case
Input:
4
0 0
100 0
100 100
0 100

Expected output:
-100.000 -100.000 0.000
Problem p01592 test case
Input:
1 1
1 1

Expected output:
Bob
Problem p01593 test case
Input:
2 1

Expected output:
0.50000000
Problem p01594 test case
Input:
4
0 0 0
0 0 1
0 1 0
1 0 0

Expected output:
2.366
Problem p01595 test case
Input:
7 8
##S####
#.....#
S.O...#
#.*|..#
L..*..#
#.O*..D
#.@...#
#######

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

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

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

Expected output:
Yes
Problem p01599 test case
Input:
1 1
10 100 0
10 100 0

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

Expected output:
12
Problem p01601 test case
Input:
13

Expected output:
11
Problem p01602 test case
Input:
3
( 5
) 4
) 1

Expected output:
YES
Problem p01603 test case
Input:
4 5
1 2 1 4 7
2 3 1 2 77
2 4 1 2 777

Expected output:
1568
Problem p01604 test case
Input:
2
LOOP:
goto LOOP;

Expected output:
1
Problem p01605 test case
Input:
abaz
3 1 5
a cab
b .
c x

Expected output:
xaxaz
Problem p01606 test case
Input:
10 2

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

Expected output:
0.500000000
Problem p01608 test case
Input:
4 1
3 1 2 7
13 8 25 9

Expected output:
1001
Problem p01609 test case
Input:
20 20 1
-1 10 10

Expected output:
21.520346288593280
Problem p01610 test case
Input:
R

Expected output:
..ry....
..ry....
ggyobbrw
ggyobbrw
..ow....
..ow....
Problem p01611 test case
Input:
3 4 2
2
1
3

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

Expected output:
1
2
Problem p01620 test case
Input:
2
1 2
bdd
3
3 2 1
DDDA
5
3 1 4 5 3
dcdkIlkP
0

Expected output:
abc
ABCx
abZfFijL
Problem p01621 test case
Input:
1 1 3 All All 1 1
2 37 5 All Night 150 1
16 2 20 All Day 5 10
1 14 15 Mon All 20000 100
0 0 0 None None 0 0

Expected output:
1.0000000000
0.2192439716
0.9884707850
0.0649933899
Problem p01622 test case
Input:
4
1 1
3 1
4 1
2 1
3
5 3
1 2
1 2
1
1000 1000
10
5 62
10 68
15 72
20 73
25 75
30 77
35 79
40 82
45 100
815 283
6
74 78
53 55
77 77
12 13
39 42
1 1
0

Expected output:
14
15
3000
2013
522
Problem p01624 test case
Input:
1 1
2 2
3 1+2*3-4
3 1|2^3&4
3 (1+2)*3
3 1-1-1-1
0 #

Expected output:
91
2
273
93
279
88
Problem p01625 test case
Input:
3
2 3 2 2 2 1
2 0 1 -1 2 -1
-2 -1 -1 -1 -2 0
6
-1 0 1 0 0 -1
-2 -1 -3 -2 -4 -2
2 -1 2 0 1 -1
4 -2 3 -2 3 -1
1 1 0 1 -1 1
-3 -1 -1 -1 -2 0
5
-1 2 0 2 1 2
-3 1 -2 1 -2 2
-2 0 -2 -1 -3 0
1 -1 0 -1 -1 -1
1 0 2 0 2 -1
4
-2 0 -2 -1 -3 -1
-1 -1 0 -1 1 -1
2 -1 2 0 3 -1
-1 0 0 0 1 0
5
-2 1 3 -1 2 1
-5 2 -5 3 -4 2
-2 -1 0 -1 -3 -1
4 2 5 2 5 3
1 -1 2 -1 -1 -1
0

Expected output:
Remove
1
Remove
2
6
Valid
Remove
1
2
3
4
Invalid
Problem p01626 test case
Input:
2
3
1 1
2 2
1 2
3
-1 1
-1 2
-2 2
1 1 2 2
0 0 0 1
2
10
1 1
7 1
7 5
5 5
5 3
6 3
6 2
3 2
3 5
1 5
10
-1 1
-1 5
-3 5
-3 3
-2 3
-2 2
-5 2
-5 5
-7 5
-7 1
2 4 6 4
0 0 0 1
2
7
-7 0
-5 0
-4 3
-3 0
-1 0
-1 4
-7 4
3
1 0
7 0
7 4
3 1 5 2
0 0 0 1
0

Expected output:
1.4142135623730951
8.0
impossible