alexjercan/bugnet huggingface dataset:
Problem p01627 test case
Input:
N T
st_time1 st_name1 ar_time1 ar_name1
st_time2 st_name2 ar_time2 ar_name2
...
st_timeN st_nameN ar_timeN ar_nameN

Expected output:
2
Kanazawa 55
Niitsu 24
Problem p01628 test case
Input:
5 4
4
3
1
2

Expected output:
3
Problem p01629 test case
Input:
2 3
3000 6000 3000
4000 5500 4500

Expected output:
11500 2
1
2
1
Problem p01630 test case
Input:
N
bit_line

Expected output:
3
Problem p01631 test case
Input:
6
AIZU 10
LINER 6
LINE 4
ALL 2
AS 1
CIEL 10
ASLA
CILI
IRZN
ELEU
21

Expected output:
40
Problem p01632 test case
Input:
3 3
1 2
2 3
3 1

Expected output:
No
No
Yes
Problem p01633 test case
Input:
8
5 0 5 10
5 10 0 5
0 5 5 0
10 0 10 10
10 10 5 5
5 5 10 0
10 2 15 5
15 5 10 8

Expected output:
2
Problem p01634 test case
Input:
password

Expected output:
INVALID
Problem p01635 test case
Input:
n T
f(n)

Expected output:
101010000
Problem p01636 test case
Input:
19

Expected output:
1
Problem p01637 test case
Input:
M r

Expected output:
9333
Problem p01638 test case
Input:
r x y n
p

Expected output:
71 156
Problem p01639 test case
Input:
n k x0

Expected output:
-768720241707614171
Problem p01640 test case
Input:
w h g

Expected output:
9
Problem p01641 test case
Input:
ABC

Expected output:
++++++++[>++++++++<-]>+.+.+.
Problem p01642 test case
Input:
1 3
1 1 1

Expected output:
4
Problem p01643 test case
Input:
n k
a

Expected output:
2
Problem p01644 test case
Input:
N (Sレアカードの種類)
P_1 (カード1が好きな人の割合)
P_2 (カード2が好きな人の割合)
...
P_N (カードNが好きな人の割合)

Expected output:
10000
Problem p01645 test case
Input:
n
s

Expected output:
16
304
18
-1
7703703700
7795884765
Problem p01646 test case
Input:
4
cba
cab
b
a
3
bca
ab
a
5
abc
acb
b
c
c
5
abc
acb
c
b
b
0

Expected output:
yes
no
yes
no
Problem p01647 test case
Input:
SA SK
DA CA
SQ SJ ST
SA HA
D2 C3
H4 S5 DA
HA D9
H6 C9
H3 H4 H5
#

Expected output:
1.00000000000000000000
0.34444444444444444198
0.63030303030303025391
Problem p01648 test case
Input:
2 1
1 2 5
4 6
1 2 1
1 3 2
1 4 3
2 3 4
2 4 5
3 4 6
8 17
1 4 767
3 1 609
8 3 426
6 5 972
8 1 607
6 4 51
5 1 683
3 6 451
3 4 630
8 7 912
3 7 43
4 7 421
3 5 582
8 4 538
5 7 832
1 6 345
8 2 608
0 0

Expected output:
5
2
421
Problem p01649 test case
Input:
3
26 16 1 8 4
10 6
9 2
9 10
3
71 363 4 8 0
52 238
25 33
59 288
0

Expected output:
3
-1
Problem p01650 test case
Input:
3 3
ac#
b#C
.BA
3 3
aaZ
a#Z
aZZ
3 3
..#
.#.
#..
1 50
abcdefghijklmnopqrstuvwxyYXWVUTSRQPONMLKJIHGFEDCBA
1 50
aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyY
1 50
abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXY
1 50
aaaaaaaaaabbbbbbbbbbcccccCCCCCBBBBBBBBBBAAAAAAAAAA
10 10
...#......
a###.#####
.bc...A...
##.#C#d#.#
.#B#.#.###
.#...#e.D.
.#A..###.#
..e.c#..E.
####d###.#
##E...D.C.
0 0

Expected output:
2
0
-1
25
25
1
25
4
Problem p01651 test case
Input:
3
2
2
1
49
95351238128934
95351238128934
95351238128932
95351238128936
95351238128936
95351238128936
95351238128960
95351238128900
95351238128896
95351238129096
95351238128772
95351238129096
95351238129096
95351238126156
95351238131712
95351238131712
95351238149576
95351238093388
95351238084040
95351237962316
95351238295552
95351237911684
95351237911684
95351235149824
95351233717380
95351249496652
95351249496652
95351226761216
95351226761216
95351082722436
95351082722436
95352054803020
95352156464260
95348273971200
95348273971200
95354202286668
95356451431556
95356451431556
95346024826312
95356451431556
95356451431556
94557999988736
94256939803780
94256939803780
102741546035788
87649443431880
87649443431880
140737488355328
32684288648324
64
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
11
0
0
1
1
1
0
1
1
1
1
1
63
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
4
1
1
1
1
0

Expected output:
1 4
123456789101112 314159265358979
None
2012 2012
None
Many
Problem p01652 test case
Input:
2 1
a 11 9
****.....
.*.*.....
.*.*.....
.*..*....
.**..*...
..**..*..
..*.*....
..**.*.*.
..*..*.*.
..*****.*
******.**
b 10 6
....*.
....*.
....*.
....*.
....*.
....*.
....*.
....*.
.**..*
*****.
19 55
*******************************************************
*.....................................................*
*.********************.********************...........*
*.*..................*.*..................*...........*
*.*.****.............*.*.............****.*.****......*
*.*..*.*..........*..*.*..*..........*.*..*..*.*......*
*.*..*.*..........*..*.*..*..........*.*..*..*.*......*
*.*..*..*.........*..*.*..*.........*..*..*..*..*.....*
*.*..**..*........*..*.*..*........*..**..*..**..*....*
*.*...**..*.......*..*.*..*.......*..**...*...**..*...*
*.*...*.*.........*..*.*..*.........*.*...*...*.*.....*
*.*...**.*.*......*..*.*..*......*.*.**...*...**.*.*..*
*.*...*..*.*......*..*.*..*......*.*..*...*...*..*.*..*
*.*...*****.*..**..*.*.*.*..**..*.*****...*...*****.*.*
*.*.******.**.*****..*.*..*****.**.******.*.******.**.*
*.*..................*.*..................*...........*
*.********************.********************...........*
*.....................................................*
*******************************************************
2 3
a 2 3
.*.
***
b 3 3
.*.
***
.*.
2 3
.*.
***
4 3
***
*.*
*.*
***
9 13
************.
*..........*.
*.......*..*.
*...*..***.*.
*..***.....*.
*...*......*.
*..........*.
************.
.............
3 1
a 2 2
.*
**
b 2 1
*
*
c 3 3
***
*.*
***
11 16
****************
*..............*
*....*********.*
*....*.......*.*
*.*..*.***...*.*
*.**.*.*.*.*.*.*
*....*.***.*.*.*
*....*.......*.*
*....*********.*
*..............*
****************
0 0

Expected output:
[[ab][ab]a]
#
a
[]
[ba]
#
[[cb]a]
#
Problem p01653 test case
Input:
3 2 2 3 1
1 2 1
1 3 2
4 3 1 4 2
2 1 3
2 3 x
4 3 x
0 0 0 0 0

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

Expected output:
708
1900484
438404500
3878
496
14246
9768
Problem p01655 test case
Input:
3 1
ACM
IBM
ICM
5 2
iwzwz
iziwi
zwizi
1 0
A
B
C
10 5
jLRNlNyGWx
yyLnlyyGDA
yLRnvyyGDA
0 0

Expected output:
ICM
iwiwi
-1
AARAlNyGDA
Problem p01656 test case
Input:
3 12
5 sogo5gokan
10 sogo10gokan
15 sogo15gokan

Expected output:
sogo10gokan
Problem p01657 test case
Input:
3 5 1
1 2 5

Expected output:
2 3 5
Problem p01658 test case
Input:
2 3
1 1 1
1 1 1

Expected output:
5
Problem p01659 test case
Input:
3
1 2 1

Expected output:
2
Problem p01661 test case
Input:
2 1
0 100
150 250
0 100
100 0

Expected output:
150
Problem p01663 test case
Input:
5
3 2
5 2
8 3
10 1
18 12

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

Expected output:
4
Problem p01667 test case
Input:
2 2
2
1 >= 3
2

Expected output:
Yes
Problem p01668 test case
Input:
1 3 2

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

Expected output:
4 8 12
Problem p01670 test case
Input:
3 3 2
1 2
2 3
3 1

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

Expected output:
8
6
7
10
6
6
Problem p01672 test case
Input:
2
1 0
0 1

Expected output:
1.4142135624
2 1
Problem p01673 test case
Input:
2 2 0 1 5
0 1 3 0 3
0 1 2 1 6

Expected output:
9
Problem p01674 test case
Input:
0.0 0.0 0.0
1.0 0.0 0.0 0.0 1.0 0.0
1.0 0.0 0.5
1.0 0.0 0.0 0.0 0.0 1.0

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

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

Expected output:
5
Problem p01677 test case
Input:
5
1 x 2 4 x
2
x x
2
1 2
2
2 1
2
1000000000 x
4
x 2 1 x
0

Expected output:
3
none
ambiguous
none
ambiguous
none
Problem p01678 test case
Input:
3?4
12?
5?6
?2?4
5?7?
?9?2
?????
?????
?????
0

Expected output:
2
40
200039979
Problem p01679 test case
Input:
2 1 1 1 10
1 2 3
2 4
2 1 1 1 9
1 2 3
2 4
4 2 2 4 50
1 2 5
3 4 5
2 15
3 15
4 6 3 1 29
1 2 20
3 2 10
4 1 5
3 1 5
2 4 3
3 4 4
2 1
4 5
3 3
0 0 0 0 0

Expected output:
1
0
1
3
Problem p01680 test case
Input:
3 2
1 2
2 3
5 0
100000 0
0 0

Expected output:
3
32
607723520
Problem p01681 test case
Input:
4
0 0
-10 -10
10 -10
10 10
-10 10
0

Expected output:
8
Problem p01682 test case
Input:
S< S< 12 >> 2 > >
123 >> 1 >> 1
1000000000   >>129
S<S<S<S<S<2>>>>>
S  <S< S<2013    >>> 11 >>> 10 >
#

Expected output:
81
30
0
294967268
14592400
Problem p01683 test case
Input:
4
1 1
8 2
9 1
14 2
4
181 4
815 4
634 4
370 4
4
52 1
40 1
81 2
73 1
10
330 1
665 3
260 1
287 2
196 3
243 1
815 1
287 3
330 1
473 4
0

Expected output:
18
634
-1
916
Problem p01684 test case
Input:
10 5 1 1 0
10 5 2 2 1
10 10 70 70 20
0 0 0 0 0

Expected output:
1 1 0.564189584 3 1 0.564189584
1 1 0.797884561 1.644647246 1 0.797884561
impossible
Problem p01685 test case
Input:
1 2
BB

WW

2 1
B
W

B
W

2 2
BW
BW

WW
WW

3 4
BBBB
BBBB
BBBB

WWWW
WWWW
WWWW

5 5
BBBBB
BBBBB
BBBBB
BBBBB
BBBBB

BBBBB
BBBWB
BBBBB
BWBBB
BBBBB

0 0

Expected output:
6.0000000000
0.0000000000
12.8571428571
120.0000000000
23795493.8449918639
Problem p01686 test case
Input:
3
.aa.cA.Cc.
.bb.Bb.AC.
.cc.ac.Ab.
1
.Xx.
.Yy.
.Zz.
6
.Aj.fA.aW.zA.Jf.Gz.
.gW.GW.Fw.ZJ.AG.JW.
.bZ.jZ.Ga.Fj.gF.Za.
9
.ab.gh.mn.st.yz.EF.KL.QR.WA.
.cd.ij.op.uv.AB.GH.MN.ST.XB.
.ef.kl.qr.wx.CD.IJ.OP.UV.yz.
2
.AC.Mo.
.IC.PC.
.oA.CM.
20
.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.qb.
.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.qb.
.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.QB.qb.
0

Expected output:
3 B C E
-1
3 J A G
10 A B G H M N S T Y Z
0
2 Q B
Problem p01687 test case
Input:
AIDUNYAN

Expected output:
AIZUNYAN
Problem p01688 test case
Input:
2
3
D 30
D 50
D 20
0

Expected output:
80
Problem p01689 test case
Input:
6 10 3 4
##########
#........#
#...D....#
#........#
#........#
##########
2 4 6
3 2 0
7 4 2
8 4 3
1 4 1

Expected output:
Yes
Problem p01690 test case
Input:
10 1 1 1 4 3
6 10
5 8

Expected output:
15
Problem p01691 test case
Input:
1 0
25 47 10

Expected output:
96.2027355887
Problem p01692 test case
Input:
3 2 2 1
0 3 6
1 1
3 -2

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

Expected output:
7
Problem p01694 test case
Input:
4
lu ru ld rd
4
lu ld lu ru
1
lu
10
ru lu ld rd ru rd ru lu rd ld
0

Expected output:
2
1
0
4
Problem p01695 test case
Input:
6
hoge
.fuga
..foobar
..jagjag
...zigzag
.piyo
8
jagjag
.hogehoge
..fugafuga
...ponyoponyo
....evaeva
....pokemon
...nowawa
.buhihi
8
hello
.goodmorning
..howareyou
.goodafternoon
..letshavealunch
.goodevening
.goodnight
..gotobed
3
caution
.themessagelengthislessthanorequaltofifty
..sothelengthoftheentirelinecanexceedfiftycharacters
0

Expected output:
hoge
+fuga
|+foobar
|+jagjag
| +zigzag
+piyo
jagjag
+hogehoge
|+fugafuga
| +ponyoponyo
| |+evaeva
| |+pokemon
| +nowawa
+buhihi
hello
+goodmorning
|+howareyou
+goodafternoon
|+letshavealunch
+goodevening
+goodnight
 +gotobed
caution
+themessagelengthislessthanorequaltofifty
 +sothelengthoftheentirelinecanexceedfiftycharacters
Problem p01696 test case
Input:
A+A++A
Z-Z--Z+-Z
[ESREVER]
J---?---J
++++++++A+++Z-----------A+++Z
[[++-+--?[--++-?++-+++L]][-+-----+-O]]++++---+L
.

Expected output:
ABC
ZYXZ
REVERSE
JAG
ICPC
JAPAN
Problem p01697 test case
Input:
3 3 3 2
1 2 3 1 1
1 3 8 1 1
2 3 3 2 2
1 3
0
3 3 2 2
1 2 3 1 1
1 3 8 1 1
2 3 3 2 2
1 3
0
6 4 3 2
1 2 3 1 1
1 3 8 1 1
4 6 3 2 2
5 6 7 2 2
1 6
0
3 3 3 2
1 2 3 1 1
1 3 8 1 1
2 3 3 2 2
1 3
2
2 6 1 2
1 2 2
3 3 2 2
1 2 3 1 1
1 3 8 1 1
2 3 3 2 2
1 3
2
2 6 1 2
1 2 2
3 2 2 2
1 2 3 1 1
2 3 3 2 2
1 3
2
2 6 1 2
1 2 2
5 4 20 4
2 4 100 5 1
1 4 100 5 3
1 5 100 5 4
3 5 100 5 2
3 2
3
2 80 1 2
2 60 1 3
2 40 2 3
0 0 0 0

Expected output:
6
8
-1
5
6
-1
200
Problem p01698 test case
Input:
1
0.0000 0.0000 0.0000 2.0000 0.0000 0.0000 4.0000 1.0000
2
0.0000 0.0000 0.0000 2.0000 0.0000 0.0000 4.0000 1.0000
10.0000 0.0000 0.0000 -2.0000 0.0000 0.0000 4.0000 1.0000
5
-10.0000 0.0000 0.0000 10.0000 0.0000 0.0000 2.0000 1.0000
-5.0000 0.0000 0.0000 10.0000 0.0000 0.0000 2.0000 1.0000
0.0000 0.0000 0.0000 10.0000 0.0000 0.0000 2.0000 1.0000
11.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 100.0000
15.0000 0.0000 0.0000 -10.0000 0.0000 0.0000 2.0000 1.0000
27
-45.6243 -40.4815 42.0513 -0.8380 -6.3628 4.5484 12.0279 2.2721
8.7056 -9.8256 34.1560 6.0068 6.2527 -6.8506 28.9807 1.5037
30.1481 29.9591 -46.2881 6.7611 8.6669 1.5629 14.5578 1.3181
24.2927 8.3779 -21.8931 0.7074 0.1879 -8.9742 5.5877 2.6893
25.3009 -42.9168 10.7480 -7.2477 -8.5507 7.7846 13.7923 2.8726
17.6938 42.3577 -5.0334 6.4949 -2.1472 -5.3101 23.3066 1.4769
-7.9296 -29.6442 -24.2157 -1.1064 -9.5802 6.5858 12.4250 2.3816
9.5851 -20.0455 -35.1885 5.7477 -1.0622 2.5211 3.5233 1.2466
-35.5762 44.5412 -46.7816 3.6053 0.4991 4.3470 20.6922 2.8529
-44.9386 -48.0381 -43.6877 7.4101 3.9491 7.1619 10.4301 2.4920
-49.9870 -28.6276 -2.6522 5.8008 -1.0054 -4.9061 25.1188 1.4916
45.0228 31.3811 29.2546 -8.7777 -3.7836 -7.7180 17.4361 1.8706
35.5553 45.8774 -29.8025 -7.3596 -9.2114 -3.5987 6.8841 2.6143
19.9857 34.3874 42.5551 5.2133 -5.5350 -7.6617 2.9294 1.4026
23.5109 18.1633 -34.8265 7.3260 -4.1912 5.3518 3.0036 1.5027
43.5134 -27.5238 49.4679 -4.5986 1.8410 6.8741 2.2009 1.4525
-28.8994 23.2934 -6.1914 5.7985 -6.2129 -8.2882 16.1683 1.7463
3.6721 38.2528 -38.7741 4.5115 6.6442 6.4406 10.7555 1.0971
17.4488 -12.6965 -23.1293 2.8257 6.3319 -1.5368 7.3785 2.9350
33.2708 -17.9437 -0.5347 8.7428 7.3193 5.9738 6.2292 2.6210
-14.4660 -25.1449 -4.4191 -9.4843 -6.6439 -4.7330 7.7910 2.1659
32.4428 -24.2605 48.1228 -5.2396 1.5916 -5.9552 1.1760 1.3618
-21.9088 43.6286 -8.8286 6.4641 0.5554 -4.6827 1.2504 1.4718
-0.1784 -42.1729 -2.7193 5.3741 0.9098 9.7622 1.4764 1.2611
29.3245 -33.2298 -26.3824 -8.4192 -2.9427 -7.3759 9.6346 1.7490
-35.1767 35.9652 33.4779 4.0088 2.4579 2.0981 19.2565 1.7121
-17.5530 1.4161 -14.0271 6.4564 -4.8261 -8.7461 3.0566 1.5906
0

Expected output:
4.0000000000
1.0000000000
1.0000000000
2.0000000000
2.0000000000
0.6111111111
0.0100000000
0.6111111111
5.2937370714
0.3931996496
11.0445337986
2.0777525750
4.8013298058
0.0925901184
5.2170809540
2.8263276111
7.2530407655
4.1854333868
0.2348376111
1.0517364512
0.0925901184
1.0517364512
1.9988021561
1.5152495697
9.2586039054
9.8035730562
2.5139693356
2.3766501335
0.2348376111
0.3931996496
0.8495719527
1.1707239711
5.5086335049
11.2472986391
1.9216647806
Problem p01699 test case
Input:
2
1 11
1 11
3
10 10
2 2
11 11
4
89 91
1 12
1 12
89 91
5
1 8
2 76
10 19
6 16
33 42
6
10 59
20 69
30 79
40 89
50 99
50 99
0

Expected output:
120
1
1278
659520
15625000000
Problem p01700 test case
Input:
117649
1
125000
1610612736
68719476636
-1

Expected output:
3
1
4
6
11
Problem p01701 test case
Input:
north
west
northwest
northnorthwest
westwestwestnorth
#

Expected output:
0
90
45
45/2
315/4
Problem p01702 test case
Input:
3 10 3
000 0000000000
110 0000001111
101 1111111100
2 2 0
1 1 0
2 1 1
01 1
11 11 10
10000000000 10000000000
11000000000 01000000000
01100000000 00100000000
00110000000 00010000000
00011000000 00001000000
00001100000 00000100000
00000110000 00000010000
00000011000 00000001000
00000001100 00000000100
00000000110 00000000010
0 0 0

Expected output:
2222221100
??
0
1
0123456789A
Problem p01703 test case
Input:
2
0.50 0.40
2
0.70 0.60
4
0.99 1.00 1.00 0.01
0

Expected output:
5.5000000000
4.0476190476
104.0101010101
Problem p01704 test case
Input:
3
10
4 3 4 10
5 4 5 20
6 5 6 30
3
7
-4 3 4 -10
5 4 5 20
6 5 6 30
3
1
-4 3 4 -10
-5 4 5 -20
6 5 6 30
3
10
-4 3 4 -10
-5 4 5 -20
-6 5 6 -30
0

Expected output:
43.5
36
13.5
0
Problem p01705 test case
Input:
2
0 8
10 8
2
0 7
10 7
0

Expected output:
12.489995996796796
9.899494936611665
Problem p01706 test case
Input:
4 4 1 4
1 2
3 1
4 2
3 4
7 8 1 7
1 2
1 3
2 4
3 4
4 5
4 6
5 7
7 6
6 4 5 2
1 2
1 3
4 5
5 6
10 21 9 10
9 1
9 2
9 3
9 4
10 1
10 2
10 3
10 4
1 5
2 5
2 6
3 6
3 7
4 7
4 8
1 8
5 10
6 10
7 10
10 8
10 9
2 15 1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 2
0 0 0 0

Expected output:
1 2
2 1
0 0
4 6
15 0
Problem p01707 test case
Input:
5 2 5
3 3 3
5 4 5
4 1 2
1 5 1
1250 50 50
0 0 0

Expected output:
4
7
52
0
0
563144298
Problem p01708 test case
Input:
((0,0)@(1,1))@((4,1)@(2,5))
((0,0)@(3,1))@((1,-3)@(2,-1))
(0,0)@(1,1)@(4,1)
(0,0)@((1,1)@(4,1))
(((0,0)@((10,20)@(((30,40))))))
((0,0)@(3,1))@((1,-3)@(2,-1))@(100,-100)@(100,100)
#

Expected output:
3.00000000 3.00000000
3.00000000 1.00000000
1.00000000 4.00000000
0.00000000 2.00000000
-10.00000000 10.00000000
-99.83681795 -91.92248853
Problem p01709 test case
Input:
1
3
0 0
1 0
0 1
4
4
0 0
10 0
10 10
0 10
4
10 0
20 0
20 10
10 10
4
0 10
10 10
10 20
0 20
4
10 10
20 10
20 20
10 20
3
4
-10 -10
2 2
10 10
-11 7
3
-1 -1
1 -1
0 0
3
0 0
3 -3
20 20
7
4
46 12
52 12
53 15
45 15
32
67 1
70 0
73 1
77 3
79 5
80 8
77 8
76 5
74 4
71 3
70 3
67 4
65 6
63 8
62 14
64 19
66 21
70 22
75 21
78 16
80 16
80 17
79 20
78 22
74 24
67 24
63 22
61 19
60 15
60 10
62 5
64 3
5
74 14
80 14
80 16
78 16
74 16
19
34 0
37 0
37 19
36 22
35 23
32 24
30 24
27 24
25 23
23 20
23 18
23 15
26 15
26 18
27 20
29 21
32 21
34 20
34 18
4
47 0
50 0
42 24
39 24
4
79 20
80 17
80 22
78 22
4
50 0
58 24
56 24
49 3
4
10
34 21
34 14
35 14
35 19
40 19
40 20
35 20
35 22
30 22
30 21
16
20 24
21 24
21 33
42 33
42 20
40 20
40 19
45 19
45 5
40 5
40 4
46 4
46 20
43 20
43 34
20 34
10
26 21
26 14
27 14
27 21
30 21
30 22
21 22
21 24
20 24
20 21
12
34 8
34 4
40 4
40 5
35 5
35 14
34 14
34 9
27 9
27 14
26 14
26 8
0

Expected output:
1
2
3
3
4
Problem p01710 test case
Input:
5 4 10
4 3 1
6 4 3
3 2 4
2 2 1
8 5 3
1 2
2 3
3 4
4 5
3 3 1000
1000 1 100
1 7 100
10 9 100
1 2
2 3
3 2
1 0 5
25 25 2
1 0 25
25 25 2
5 5 100
1 1 20
1 1 20
10 1 1
10 1 1
10 1 1
1 2
2 1
3 4
4 5
5 3
3 3 100
70 20 10
50 15 20
90 10 10
1 2
2 2
2 3
0 0 0

Expected output:
15
2014
0
25
40
390
Problem p01711 test case
Input:
00000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000111111111
10000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
#

Expected output:
yes
yes
no
Problem p01712 test case
Input:
3 9 9
2 2 2
5 5 2
8 8 2

Expected output:
Yes
Problem p01713 test case
Input:
7
2 0 -2 3 2 -2 0

Expected output:
4
Problem p01714 test case
Input:
5
0 0 0 0
1 0 -1 1
-1 0 1 -1
1 1 -1 1
-1 -1 1 -1

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

Expected output:
4
Problem p01716 test case
Input:
3 1
a1a
a 99

Expected output:
19
Problem p01717 test case
Input:
6 5 4
2 1 1
2 5 2
5 1 1
4 3 2
3 6 -1

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

Expected output:
15
45
Problem p01719 test case
Input:
2 2 5
3 2
5 4

Expected output:
9
Problem p01720 test case
Input:
3 2 1 3
1 2
2 3

Expected output:
1
Problem p01721 test case
Input:
10 10 1 10 3 3 7 7

Expected output:
1
Problem p01722 test case
Input:
0

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

Expected output:
1
Problem p01724 test case
Input:
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
......O........
......X........

Expected output:
1
Problem p01725 test case
Input:
3-2*3

Expected output:
3
Problem p01726 test case
Input:
abcbcdbc
abc

Expected output:
2
Problem p01727 test case
Input:
4 10000 00101
Q
A 0
B 1
Q

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

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

Expected output:
1
Problem p01730 test case
Input:
3
5 10
-10 0
3 -10

Expected output:
14
Problem p01731 test case
Input:
1
0
icpc

Expected output:
icpc
Problem p01732 test case
Input:
3 3 1
1 1 3 3
0 0
1 RRDDLLUU

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

Expected output:
5 / 1
Problem p01734 test case
Input:
3
26 29 9 12
6 10 15 16
8 17 18 19

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

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

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

Expected output:
Yes
Problem p01738 test case
Input:
3 3
2 4 1 2 1
XAX
B.B
XAX

Expected output:
0.0000000000000
Problem p01739 test case
Input:
2
1 2 2
0

Expected output:
2
Problem p01740 test case
Input:
3
.oo
o..

o.o
o..

Expected output:
1
Problem p01741 test case
Input:
1.000

Expected output:
2.000000000000
Problem p01742 test case
Input:
2
?sum??mer
c??a??mp

Expected output:
703286064
Problem p01743 test case
Input:
2
3
3

Expected output:
5
Problem p01744 test case
Input:
4 4 1
3 3

Expected output:
2
3
4
1
Problem p01745 test case
Input:
1
00011000

Expected output:
00011101
Problem p01746 test case
Input:
7
0 3 1
0 3 2
1 -1 2
0 0 1
-2 4 1
-4 0 1
2 1 2

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

Expected output:
Possible
Problem p01748 test case
Input:
10
4 1
1 1
3 1
3 1
5 1
6 1
6 1
8 1
4 1

Expected output:
0
3
3
4
5
7
10
13
16
19
Problem p01749 test case
Input:
3 2 2

Expected output:
14
Problem p01750 test case
Input:
2
6
3
4

Expected output:
15
Problem p01751 test case
Input:
10 10 5

Expected output:
5
Problem p01752 test case
Input:
3 3
G##
.#.
.

Expected output:
4
Problem p01753 test case
Input:
5 1
0 10 0 5 2
0 20 0 5 12
0 30 0 5 22
0 40 0 5 32
0 50 0 5 42
0 0 0 0 60 0

Expected output:
110
Problem p01754 test case
Input:
1 1 1
2

Expected output:
2
Problem p01755 test case
Input:
5 3
###
#g#
#.#
#s#
###
^<^<vv

Expected output:
5
Problem p01756 test case
Input:
abracadabra
5
ab a
a a
b c
ac ca
z z

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

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

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

Expected output:
0.0000000000 0.0000000000
0.6324555320 0.6324555320
-0.6324555320 0.6324555320
-0.6324555320 -0.6324555320
0.6324555320 -0.6324555320
Problem p01760 test case
Input:
40 1000
80 20
100 100

Expected output:
0.0000000000
Problem p01761 test case
Input:
6
antbook iwiWataKitamasa 2012/01/28
hogebook foo 2000/01/01
hugabook bar 2000/01/01
cheeterbook chokudai 2012/09/29
aojbook YutakaWatanabe 2014/06/28
piyobook buz 2000/01/01
4
a * * *
* chokudai * *
* Chokudai * *
* * 2014/01/01 2014/12/31

Expected output:
antbook
hugabook
aojbook

cheeterbook


aojbook
Problem p01762 test case
Input:
5
2 2 2 2
0 1 4
1 2 1
1 3 1
1 4 1

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

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

Expected output:
11
Problem p01766 test case
Input:
5
0 1 0 3 4
30 1 0 3 4
90 2 0 6 8
120 1 1 1 1
132 2 1 2 2

Expected output:
5.00000000 1.00000000
1.41421356 0.20000000
Problem p01767 test case
Input:
6
1 2 1 3 4 5
7
1 3 4 5 3 1 0
2 4 5 3 4 5 3

Expected output:
Yes
Yes
Yes
Yes
Yes
No
No
Problem p01768 test case
Input:
2
tako 2
yaki 1
1
tako yaki

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

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

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

Expected output:
8
5
Problem p01772 test case
Input:
AIZUNYANPEROPERO

Expected output:
AZ
Problem p01773 test case
Input:
2 10:00-11:30 12:00-13:00
2
1 10:00-15:00
2 09:00-12:00 18:10-18:55
2
2 10:00-13:00 15:30-16:40
3 06:00-08:00 12:00-13:10 15:00-17:00

Expected output:
2
Problem p01774 test case
Input:
28
0

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

Expected output:
7
Problem p01776 test case
Input:
6
0 0
-1 -2
3 -2
2 0
3 2
-1 2

Expected output:
6.000000000
Problem p01777 test case
Input:
7
4 1 10 5 7 7 3
5
2 5 0
3 6 1
3 6 2
1 7 2
1 7 5

Expected output:
1
1
0
3
1
Problem p01778 test case
Input:
4
D 1
D 2
A 3
D 4
4
A 1 7
D 4 5
D 3 6
B 3 3

Expected output:
6
Problem p01780 test case
Input:
4
1 1 2

Expected output:
6
Problem p01781 test case
Input:
2 2 2 0 0 0 5

Expected output:
1 3 3 1 0
Problem p01782 test case
Input:
3
aab
czc
baa

Expected output:
aac