alexjercan/bugnet huggingface dataset:
Problem p01783 test case
Input:
R?????,2?)

Expected output:
29
Problem p01784 test case
Input:
3
()(()((
))()()(()
)())(())

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

Expected output:
1
Problem p01786 test case
Input:
10 2
2
1

Expected output:
5 7
3 5
Problem p01787 test case
Input:
R 100 L 20 E 10 \$
R 5 L 10 \$
X 20 \$

Expected output:
R 95 X 20 L 10 E 10 \$
Problem p01788 test case
Input:
3 3 1
1 1 10 10
AAA
A..
A..

Expected output:
100
Problem p01789 test case
Input:
3 5 4
3
6
12

Expected output:
Hanako
Problem p01790 test case
Input:
2
()
1 2

Expected output:
1
Problem p01791 test case
Input:
4 2 58 100
10 10 50 80

Expected output:
75
2 3
Problem p01792 test case
Input:
60 2 3

Expected output:
0.789473
1
1
Problem p01793 test case
Input:
3 2
1 2 1
2 3 2
1 10 100

Expected output:
320
Problem p01794 test case
Input:
2 1
1 2
1 2 1 1

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

Expected output:
2
Problem p01796 test case
Input:
7 4
DEFG
FEDA
EFGB
BGEA
AGFD
DABC
CADE

Expected output:
ABCDEFG
Problem p01797 test case
Input:
2 -3 4
L 2 5
? 3 5

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

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

Expected output:
5
Problem p01800 test case
Input:
100 100 0 1

Expected output:
1.16699564
Problem p01801 test case
Input:
2 2
..
..

Expected output:
Second
Problem p01802 test case
Input:
2 1
7 5
7 6
7 7
76 5
8 41
0 0

Expected output:
0.4142135624
0
0.0827625303
0
48.7401153702
33
Problem p01803 test case
Input:
3
haneda
oookayama
tsu
2
azusa
azishirabe
2
snuke
snake
4
haneda
honda
hanamaki
hawaii
0

Expected output:
1
4
-1
3
Problem p01804 test case
Input:
1 1
##
#.
..
..
#.
..
1 1
.#
#.
#.
..
..
.#
2 2
##
#.
##
#.
..
.#
##
#.
#.
..
#.
..
1 3
#.
..
##
##
##
##
##
##
##
##
##
##
##
##
10 3
##
#.
##
#.
##
.#
##
.#
#.
##
#.
##
.#
##
.#
##
.#
#.
.#
#.
#.
.#
#.
.#
#.
..
#.
..
#.
..
#.
..
10 3
##
.#
##
..
##
#.
.#
..
##
.#
.#
##
.#
##
#.
##
##
.#
..
.#
#.
#.
.#
#.
#.
#.
#.
..
..
..
..
.#
0 0

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

Expected output:
Yes
No
Yes
No
Problem p01806 test case
Input:
1
0 0
1 2 3 4 5 6
RRRRBBBBLLLLFFFF
2
0 0
1 1 1 1 1 1
RRR
2 2
100 100 100 100 100 100
FFF
1
1000 -1000
1 2 3 4 5 6
LFRB
4
-3 -4
1 2 3 4 5 6
BBBBBBBB
4 -3
11 12 13 14 15 16
LLLLLLLL
3 4
21 22 23 24 25 26
FFFFFFFF
-4 3
31 32 33 34 35 36
RRRRRRRR
3
-2 -2
9 3 1 1 1 1
RRRRBLLLBRRBLB
0 -3
2 5 2 5 2 1
BBLBBRBB
3 0
10 7 2 10 1 5
LLFLLBLL
0

Expected output:
64
403
10
647
96
Problem p01807 test case
Input:
4 5 1 4
1 2 (
1 3 a
2 4 a
3 4 )
3 2 +
4 4 1 2
1 3 (
3 4 a
4 1 +
3 2 a
3 4 1 1
1 2 a
2 2 +
2 3 a
3 1 a
5 8 1 5
1 1 [
1 2 (
2 1 *
2 2 a
2 3 a
3 3 )
3 4 ]
4 5 )
2 14 1 1
1 2 a
1 2 (
1 2 )
1 2 [
1 2 ]
1 2 +
1 2 *
2 1 a
2 1 (
2 1 )
2 1 [
2 1 ]
2 1 +
2 1 *
0 0 0 0

Expected output:
Yes
No
No
Yes
No
Problem p01808 test case
Input:
3
1 4
-5 5
5 -5
10
1 10
-10 5
5 -10
5
3 5
-20 0
20 0
8
1 9
-14 58
6 24
2
2 8
-57 -113
42 -31
4
1 4
-4 -5
4 5
0

Expected output:
17.5032106371
41.3850388846
-1
102.0656847372
178.1399151364
19.5548716821
Problem p01809 test case
Input:
1 2

Expected output:
2
Problem p01810 test case
Input:
4 2

Expected output:
7
Problem p01811 test case
Input:
ABC

Expected output:
Yes
Problem p01812 test case
Input:
4 2 2
1 2
2 4
3 1
4 2
1 3

Expected output:
2
Problem p01813 test case
Input:
1-(2+3-4+5)

Expected output:
5
Problem p01814 test case
Input:
abcabcaxcabc
4
1 9 3
8 12 3
1 4 2
2 3 2

Expected output:
Yes
Yes
No
Yes
Problem p01815 test case
Input:
6 6
1 2 3 4 5 6
1 2
2 3
3 4
1 4
4 5
5 6

Expected output:
21
Problem p01816 test case
Input:
6 3
T=T|X
T=T|Y
T=T|Y
T=T^Y
T=T&X
0 1
0 2
1 3
1 4
2 5
5 6
3 5
0 0

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

Expected output:
2
3
1
Problem p01818 test case
Input:
7 2
1 2
5 6

Expected output:
3
Problem p01819 test case
Input:
2 1
WE

Expected output:
1 2
Problem p01820 test case
Input:
9
0 0 v
1 0 >
2 0

Expected output:
9
Problem p01821 test case
Input:
3

Expected output:
1
Problem p01822 test case
Input:
4 5 3
-10 -10
10 -10
10 10
-10 10
1 2
1 3
1 4
2 3
3 4
-20 0
1 0
20 0

Expected output:
No
Yes
No
Problem p01823 test case
Input:
3 3 4
1 2 1 1
2 3 2 4
3 1 1 1

Expected output:
6
Problem p01824 test case
Input:
2 2 2 1
0 0 0

Expected output:
24
Problem p01825 test case
Input:
3
0 1
0 0 0 1
0 1 0 2
0 2 0 3

Expected output:
6.0000000000000000
Problem p01826 test case
Input:
2 10
10 200 1
10 100 100

Expected output:
200
Problem p01827 test case
Input:
3
1 3 3
2
1 2
1 3

Expected output:
5
Problem p01828 test case
Input:
acmicpc
tsukuba

Expected output:
No
Problem p01829 test case
Input:
201

Expected output:
701
Problem p01830 test case
Input:
3
y 7
y 6
n 5

Expected output:
1
Problem p01831 test case
Input:
7
>>

Expected output:
7
Problem p01832 test case
Input:
3 2
R1

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

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

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

Expected output:
1
Problem p01836 test case
Input:
200 500 800 500
3
400 0
450 500
400 1000
3
600 0
550 500
600 1000

Expected output:
100 600
Problem p01837 test case
Input:
3 2 3 1 3
1 2 2 1
2 3 1 2

Expected output:
6.0000000
Problem p01838 test case
Input:
4 3
1 3 4 7

Expected output:
6
Problem p01839 test case
Input:
4
A
Un
A
Un

Expected output:
YES
Problem p01840 test case
Input:
1 1 5
3

Expected output:
3
Problem p01841 test case
Input:
((()[8]())[2]())[5](((()[2]())[6](()[3]()))[1]())
(()[4]())[3](((()[2]())[1]())[8](()[3]()))

Expected output:
(()[6]())[8](((()[4]())[7]())[9]())
Problem p01842 test case
Input:
2 2
100 -1
200 300

Expected output:
-100
Problem p01843 test case
Input:
1 2
4
5 5
15 5
15 15
5 15
0 10
20 10

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

Expected output:
7
Problem p01845 test case
Input:
10 5 3 4
2 5 2 3
91 13 7 62
10 1 3 5
20 100 2 20
2 14 7 1
0 0 0 0

Expected output:
2
3
0
0
9
96
Problem p01846 test case
Input:
b1/1b
1 1 1 2
b5/bbbbbb
2 4 1 4
b2b2b/7
1 4 2 4
#

Expected output:
1b/1b
b2b2/bbb1bb
b5b/3b3
Problem p01847 test case
Input:
4
0 0
10 0
10 10
0 10
0 0
5 0
5 10
0 10
6
0 0
10 0
10 5
5 5
5 10
0 10
2 0
8 0
8 10
2 10
12
1 1
1 3
-1 3
-1 1
-3 1
-3 -1
-1 -1
-1 -3
1 -3
1 -1
3 -1
3 1
2 2
-2 2
-2 -2
2 -2
4
20000 20000
-20000 20000
-20000 -20000
20000 -20000
1000 1000
-1000 1000
-1000 -1000
1000 -1000
4
1000 1000
-1000 1000
-1000 -1000
1000 -1000
20000 20000
-20000 20000
-20000 -20000
20000 -20000
4
0 0
10 0
10 10
0 10
20 0
30 0
30 10
20 10
0

Expected output:
50
30
8
1596000000
0
100
Problem p01848 test case
Input:
2
0.60 1 2
0.60 0
2
0.60 1 2
0.60 1 1
5
0.10 1 2
0.20 1 3
0.30 1 4
0.40 1 5
0.50 1 1
5
0.10 0
0.20 1 1
0.30 1 1
0.40 1 1
0.50 1 1
5
0.10 4 2 3 4 5
0.20 0
0.30 0
0.40 0
0.50 0
4
0.10 1 2
0.20 0
0.30 1 4
0.40 1 3
5
0.10 0
0.20 0
0.30 0
0.40 0
0.50 0
0

Expected output:
0.400000000
0.640000000
0.998800000
0.168000000
0.900000000
0.792000000
0.151200000
Problem p01849 test case
Input:
1 1
5
6
1 1
5
2
1 1
20
5
4 1
2 4 5 9
8
4 3
3 5 2 1
10 4 7
5 5
2 2 2 2 2
1 3 5 7 9
2 5
2 5
2 5 2 5 2
0 0

Expected output:
1
2
5
1
1
5
4
Problem p01850 test case
Input:
3
icpc
icfp
topcoder
4
apple
application
appointment
acmicpc
3
a
aa
aaa
4
a
aza
azb
b
0

Expected output:
icfp
topcoder
icpc
apple
acmicpc
application
appointment
aa
a
aaa
a
aza
b
azb
Problem p01851 test case
Input:
1 1 0 1 1
0 0 2 3 2
4 0 0 33 4
5 4 2 20 25
4726 87361 2742 23497 162843
328324 420923 12782 834286 538297
0 0 0 0 0

Expected output:
2
0
114660
512095631
673703234
166259450
Problem p01852 test case
Input:
0

Expected output:
0
Problem p01853 test case
Input:
3 100

Expected output:
0 0 100
Problem p01854 test case
Input:
2 15
2 3 3 7 2
2 7 1 1 4

Expected output:
6.33333333
Problem p01855 test case
Input:
3
2 3
3 3
4 3

Expected output:
1 1
1 0
1 1
Problem p01856 test case
Input:
7 5
0 0 0 0 0
0 1 1 1 0
0 2 2 2 0
0 3 3 3 0
0 2 2 2 0
0 1 1 1 0
0 0 0 0 0

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

Expected output:
5
3
1
Problem p01858 test case
Input:
3
tameru
tameru
tameru
tameru
kougekida
tameru

Expected output:
Nakajima-kun
Problem p01859 test case
Input:
3 2
2 2

Expected output:
NAKAJIMA
Problem p01860 test case
Input:
3 9 3 2 3
1 2 3
1 1 2
2 3 1
3 4 2
4 1 3
4 1 1
5 1 1
6 2 3
7 2 2

Expected output:
6
Problem p01861 test case
Input:
3
3 5 3
3
5 2 3
3 3 1
7 1 2

Expected output:
Yes
Problem p01862 test case
Input:
2
10 5

Expected output:
1
-10.00 -6.48
-10.79 -8.91
-13.34 -8.91
-11.28 -10.41
-12.07 -12.84
-10.00 -11.34
-7.93 -12.84
-8.72 -10.41
-6.66 -8.91
-9.21 -8.91
2
10.00 12.34
9.47 10.72
7.77 10.72
9.15 9.72
8.62 8.10
10.00 9.10
11.38 8.10
10.85 9.72
12.23 10.72
10.53 10.72
Problem p01863 test case
Input:
NicoNicoNi

Expected output:
Love Nico!
Problem p01864 test case
Input:
5 6
100 80 70 60 50
1 2 500
2 5 100
1 3 400
1 4 200
3 5 700
4 5 800
1
5 3 600

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

Expected output:
1
-3 2
Problem p01866 test case
Input:
5
00001
3

Expected output:
11101
Problem p01867 test case
Input:
5
a+a+a

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

Expected output:
2
Problem p01869 test case
Input:
1

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

Expected output:
9
Problem p01871 test case
Input:
4
0 0
0 1
1 1
1 0

Expected output:
1
Problem p01872 test case
Input:
?12345678901

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

Expected output:
2
Problem p01874 test case
Input:
2 2 0 0
3 3
4 0

Expected output:
7.16227766017
Problem p01876 test case
Input:
3 3 4
111
111
111
111
111
111

Expected output:
2
Problem p01877 test case
Input:
10
0 1 2 3 4 4 3 2 1 0
7
2 6 0
2 4 5
7 9 10
2 4 5
3 8 100
4 6 1000
7 7 1000

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

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

Expected output:
2
1
Problem p01880 test case
Input:
2
1 2

Expected output:
2
Problem p01881 test case
Input:
2 4
%.@\$
..\$\$

Expected output:
Yes
Problem p01882 test case
Input:
4
Durett 7
Gayles 3
Facenda 6
Daughtery 0
1
+ Mccourtney 2

Expected output:
Mccourtney is not working now.
Durett is working hard now.
Problem p01883 test case
Input:
1

Expected output:
)(
Problem p01884 test case
Input:
5
1 2
1 3
1 4
1 5

Expected output:
6
Problem p01885 test case
Input:
3 9
6 3
5 2
3 1
2
2
2

Expected output:
2
Problem p01886 test case
Input:
8
-10 0
-10 5
-5 5
-5 0
10 0
10 -5
5 -5
5 0

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

Expected output:
6
Problem p01888 test case
Input:
1 10 2
1 1 1

Expected output:
2.0
Problem p01889 test case
Input:
1
5 1

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

Expected output:
4
Problem p01891 test case
Input:
5 3 6 9
9 7 5 3 1

Expected output:
2
Problem p01892 test case
Input:
19 30 3

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

Expected output:
YES
0 1 0
0 0 1
0 0 0
Problem p01894 test case
Input:
3 3
1 2
2 3
3 1

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

Expected output:
YES
Problem p01897 test case
Input:
3 3
1 2
2 3
3 1

Expected output:
YES
Problem p01898 test case
Input:
5 5
--o--
--xo-
--x--
o---x
--xoo

Expected output:
3
Problem p01899 test case
Input:
5 130
130 170 100 120 140

Expected output:
50
Problem p01900 test case
Input:
6
2 5 2 5 2 1

Expected output:
5
Problem p01901 test case
Input:
20
1
0 10

Expected output:
10
Problem p01902 test case
Input:
1
1 1
3 0 1 1
1 1

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

Expected output:
8
Problem p01904 test case
Input:
1

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

Expected output:
1
Problem p01906 test case
Input:
8 2
23 61 57 13 91 41 79 41

Expected output:
170
Problem p01907 test case
Input:
0.75
4
1 2 1
2 3 3
3 4 10

Expected output:
24.8569335938
Problem p01908 test case
Input:
5
password
login
admin
root
master

Expected output:
b
Problem p01909 test case
Input:
RRLUDDD
2

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

Expected output:
7
Problem p01911 test case
Input:
2 2 1 2
1 2 10 100
1 2 5 500

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

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

Expected output:
8
Problem p01914 test case
Input:
5
3 5
7 4
11 9
3 7
7 8

Expected output:
4
Problem p01915 test case
Input:
3 2 2
50 65 70
80 100 80
90 65 45
1 1

Expected output:
225
Problem p01916 test case
Input:
hcpc

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

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

Expected output:
34
Problem p01920 test case
Input:
10
0101100110
3
3 3 1
1 6 0
2 5 1

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

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

Expected output:
Yes
Problem p01923 test case
Input:
5 3
1 1
2 3
3 2
3 5
2 1
4 2
1 7
2 1
1 3
1 5
6 1
1 3
1 2
1 8
1 2
1 7
1 6
20 9
4 10
2 4
5 3
6 6
6 3
7 4
8 10
4 6
7 5
1 8
5 7
1 5
6 6
9 9
5 8
6 7
1 4
6 4
7 10
3 5
19 6
4 1
6 5
5 10
1 10
3 10
4 6
2 3
5 4
2 10
1 8
3 4
3 1
5 4
1 10
1 3
5 6
5 2
1 10
2 3
0 0

Expected output:
9
8
8
71
51
Problem p01924 test case
Input:
5 2 3
3
5
1
2
3
3 100 100
3
3
4
20 3 8
3
2
6
1
9
1
8
4
2
2
8
1
8
8
2
5
3
4
3
8
7 2 2
0
2
5
2
5
2
1
0 0 0

Expected output:
3
0
11
5
Problem p01925 test case
Input:
3 2
5 2 1 3
8 2 2 3
2 3
8 2 1 2
3 1 1
5 1 2
2 5
100 1 1
100 1 1
100 1 1
100 1 1
100 1 1
3 4
5 1 1
5 1 2
100 2 1 3
100 2 2 3
0 0

Expected output:
14
11
501
196
Problem p01926 test case
Input:
3 4
1 5 9
1 2
1
2 10
1 1000000
2 4
1 10
0 0

Expected output:
3
-1
499996
4
Problem p01927 test case
Input:
2
4 1 0 0 1 0 1 1 0 1
4 2 2 2 3 2 3 3 2 3
60 45
-1 -1 4 4
4
4 1 0 0 3 1 1 2 0 1
3 2 10 7 8 2 12 4
6 8 7 12 8 13 9 15 10 19 11 24 10 25
5 4 16 2 16 4 12 8 14 2 15 0
167 38
3 3 15 21
12
4 3 -8 -3 -9 -3 -9 -5 -8 -6
4 5 -4 -5 -7 -5 -7 -6 -5 -6
4 2 -4 1 -5 1 -5 -4 -4 -4
4 1 -1 1 -2 1 -2 -4 -1 -3
4 2 2 3 -1 3 -2 2 3 2
4 1 3 1 2 1 2 -3 3 -4
4 7 1 0 0 0 0 -1 1 -1
4 4 9 5 7 5 7 4 10 4
4 3 6 5 5 4 5 0 6 0
4 5 8 -1 5 -1 6 -2 8 -2
4 1 10 0 9 0 9 -2 10 -1
4 6 10 2 8 2 8 1 10 1
131 78
-10 10 10 -10
0

Expected output:
1.93185
7.87174
20.86840
Problem p01928 test case
Input:
2
1 2 3
4 2 3
3
2 5 2
3 3 4
5 5 5
5
1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
5
1 1 1
2 1 1
3 1 1
4 1 1
5 1 1
10
3 1 4
1 5 9
2 6 5
3 5 8
9 7 9
3 2 3
8 4 6
2 6 4
3 3 8
3 2 7
0

Expected output:
24
145
125
15
864
Problem p01929 test case
Input:
2
2 1
3
3 1 2
10
2 1 1 1 1 1 1 1 1 1
8
2 1 4 3 3 7 6 6
25
2 3 2 5 4 5 8 7 8 11 10 13 12 15 14 17 16 19 18 21 20 23 22 25 24
10
2 1 4 3 6 5 8 7 10 9
0

Expected output:
2
0
0
144
633544712
11520
Problem p01930 test case
Input:
3 2
#.#
...
#.#
###
...
###
3 2
#.#
...
#.#
###
#.#
###
3 3
#..
..#
###
..#
#.#
#..
#..
..#
###
5 3
.....
#####
##...
##.##
##...
.....
#####
.....
#####
.....
...##
##.##
...##
#####
.....
3 2
#.#
...
#.#
#.#
#.#
#.#
0 0

Expected output:
Yes
No
Yes
Yes
Yes
Problem p01931 test case
Input:
3
oxx

Expected output:
2
Problem p01932 test case
Input:
2 2
2 2
3 3

Expected output:
5
Problem p01933 test case
Input:
6 3
0
0
2
3
4
5

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

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

Expected output:
4
Problem p01936 test case
Input:
3 5

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

Expected output:
-1
Problem p01938 test case
Input:
AIZU

Expected output:
2
Problem p01939 test case
Input:
3 9

Expected output:
50
Problem p01940 test case
Input:
aizucamp
azu

Expected output:
yes
Problem p01941 test case
Input:
3 4
3 2 2
2 1 1
2 1 1

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

Expected output:
0 1
1 1
0 1
Problem p01943 test case
Input:
6 2.01
1.10
1.44
0.91
2.00
1.12
1.55

Expected output:
3
Problem p01944 test case
Input:
10 3 2
3
6
6

Expected output:
1
0
4
2
0
0
5
0
0
4
Problem p01945 test case
Input:
((*)())

Expected output:
2
Problem p01946 test case
Input:
65 60 3
-2 3 -4

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

Expected output:
7 4 1
8 6 2
9 5 3
Problem p01948 test case
Input:
2
2
1 40 40 20

Expected output:
0.8
Problem p01949 test case
Input:
3 3
1+2
+9*
1*5

Expected output:
46
Problem p01950 test case
Input:
3 3
1 2
1 3
2 3

Expected output:
2
Problem p01951 test case
Input:
3 3 2 10
5 3 7
2 6 1
3 4 1

Expected output:
Yes
Problem p01952 test case
Input:
4 20 20 1
10 0
20 10
10 20
0 10

Expected output:
Yes
Problem p01953 test case
Input:
3 2
2 3
3 4
1 2

Expected output:
15
Problem p01954 test case
Input:
2 2 23 2
7 10
9 10

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

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

Expected output:
9
Problem p01957 test case
Input:
[[m-y]-[a-o]]
o 0
a 1
y 2
m 0

Expected output:
Yes
Problem p01958 test case
Input:
1 9

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

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

Expected output:
0
Problem p01961 test case
Input:
11 7
.......
.......
*.....*
.......
..@....
.......
*......
.......
....*..
.......
.......

Expected output:
.......
.......
*#####*
......#
..@...#
..#.###
*##.#..
#...#..
####*..
.......
.......
Problem p01962 test case
Input:
3
2 0 0 1 0
2 0 5 1 5
4 1 -10 -5 10

Expected output:
2
Problem p01963 test case
Input:
3
a
b
ab
abab

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

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

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

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

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

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

Expected output:
2
Problem p01973 test case
Input:
brainfuck
1
fuck

Expected output:
1
Problem p01974 test case
Input:
5
1 2 4 7 10

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

Expected output:
Yes
Problem p01976 test case
Input:
8
5 2 4 9 4 9 2 5

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

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

Expected output:
7
Problem p01979 test case
Input:
5124

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

Expected output:
No
Yes
Problem p01981 test case
Input:
HEISEI 1 1 8
HEISEI 31 4 30
HEISEI 31 5 1
HEISEI 99 12 31
HEISEI 38 8 30
HEISEI 98 2 22
HEISEI 2 3 26
HEISEI 28 4 23
#

Expected output:
HEISEI 1 1 8
HEISEI 31 4 30
? 1 5 1
? 69 12 31
? 8 8 30
? 68 2 22
HEISEI 2 3 26
HEISEI 28 4 23
Problem p01982 test case
Input:
3 1988 2014
400
100
4
1 1000 1999
1
2 1111 3333
2
2
6 2000 3000
5
7
11
9
3
13
0 0 0

Expected output:
7
1000
2223
785
Problem p01983 test case
Input:
[+c[+a[^bd]]]
0404
[*b[*[*cd]a]]
7777
[^[^ab][^cd]]
1295
a
9876
[^dd]
9090
.

Expected output:
0 10
7 1
15 544
9 1000
0 10000
Problem p01984 test case
Input:
1
2
3
390
1124
1546
314159265358979323
0

Expected output:
10
12
13
2020
25252
57577
7744444777744474777777774774744777747477444774744744
Problem p01985 test case
Input:
6 7
1 2
1 4
2 3
2 5
3 4
4 5
4 6
2 1
1 2
3 3
1 2
1 3
2 3
4 3
1 2
2 3
3 4
5 4
1 2
2 3
3 4
4 5
0 0

Expected output:
2
1
2
0
0
1
1
1
1
Problem p01986 test case
Input:
3 3
2 1
2 2
10
10 4
1 1
1 5
1 9
1
5 7
1000000000 1
1000000000 1
1000000000 3
1000000000 3
1000000000 5
1000000000 5
1
10000 11
10934235 560
3155907 1508
10901182 2457
3471816 3590
10087848 4417
16876957 5583
23145027 6540
15162205 7454
1749653 8481
6216466 9554
7198514
701 14
8181 636
4942 273
1706 282
6758 20
7139 148
6055 629
8765 369
5487 95
6111 77
2302 419
9974 699
108 444
1136 495
2443
0 0

Expected output:
10
0
5999999960
23574372
985
Problem p01987 test case
Input:
1 2
2 1
2 2
0 0

Expected output:
4.25
7
7.9722222222
Problem p01988 test case
Input:
8
1 1 2 2
0 2
0 0
2 0
2 1
3 1
3 3
1 3
1 2
12
-9 5 9 -9
0 0
0 -13
3 -13
3 -10
10 -10
10 10
-1 10
-1 13
-4 13
-4 10
-10 10
-10 0
12
3 57 53 2
0 0
64 0
64 18
47 18
47 39
64 39
64 60
0 60
0 44
33 44
33 30
0 30
0

Expected output:
1
1
2
Problem p01989 test case
Input:
123456789

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

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

Expected output:
2
Problem p01992 test case
Input:
7
banana
at
tomb
bus
sound
does
some

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

Expected output:
2 3
Problem p01994 test case
Input:
4
101 110
101 101
1010 1101
11011001 10010101

Expected output:
1
0
3
12
Problem p01995 test case
Input:
acpc

Expected output:
5
Problem p01996 test case
Input:
6 4
1 4 5 6

Expected output:
2
Problem p01997 test case
Input:
1 2

Expected output:
33.510322
Problem p01998 test case
Input:
3

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

Expected output:
2
Problem p02001 test case
Input:
8
.oo.ooo.
o.o.oo.o

Expected output:
Yes
Problem p02002 test case
Input:
7
9^2&1|2
4
0 6
0 2
2 6
4 4

Expected output:
3
11
2
1
Problem p02003 test case
Input:
5 5
.....
.#.#.
.###.
.#.#.
.....

Expected output:
3
Problem p02004 test case
Input:
RRRRLLLLRRRR

Expected output:
2
Problem p02005 test case
Input:
2
white 20
black 10
2
black
white

Expected output:
Yes
Problem p02006 test case
Input:
6 3 2
1 2
2 10
3 5

Expected output:
17
24
Problem p02007 test case
Input:
6 7
appreciate
appropriate
acceptance
ace
acm
acetylene
appr iate
a e
a a
ac ce
ace e
acceptance acceptance
no match

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

Expected output:
0.5
Problem p02009 test case
Input:
2
1
1

Expected output:
Alice
Problem p02010 test case
Input:
100
+123

Expected output:
2
Problem p02011 test case
Input:
3
0 0
3 0
5 0

Expected output:
31.415926535
Problem p02012 test case
Input:
25

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

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

Expected output:
1
3
2
Problem p02015 test case
Input:
(No input)

Expected output:
Paken
Problem p02016 test case
Input:
ani

Expected output:
square1001
Problem p02017 test case
Input:
3 5 1 4

Expected output:
No
Problem p02018 test case
Input:
5
4 3 5 2 6

Expected output:
3
Problem p02019 test case
Input:
6 3 2 1

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

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

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

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

Expected output:
3
Problem p02024 test case
Input:
4 5 2 3

Expected output:
Yes
Problem p02025 test case
Input:
2 2
1 2
4 8

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

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

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

Expected output:
8
Problem p02029 test case
Input:
3 1
10 1
20 2
30 3
20 2

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

Expected output:
2 6
1
4
1
2
3
4
7
9
Problem p02031 test case
Input:
2
2 1

Expected output:
(())
Problem p02032 test case
Input:
18

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

Expected output:
2
Problem p02034 test case
Input:
6
tabata

Expected output:
3
Problem p02035 test case
Input:
3 310779401

Expected output:
12
Problem p02036 test case
Input:
3 1000000007

Expected output:
204
Problem p02037 test case
Input:
5 8
2 2

Expected output:
8
Problem p02038 test case
Input:
3
F T T

Expected output:
T