alexjercan/bugnet huggingface dataset:
Problem p00001 test case
Input:
1819
2003
876
2840
1723
1673
3776
2848
1592
922

Expected output:
3776
2848
2840
Problem p00002 test case
Input:
5 7
1 99
1000 999

Expected output:
2
3
4
Problem p00003 test case
Input:
3
4 3 5
4 3 6
8 8 8

Expected output:
YES
NO
NO
Problem p00004 test case
Input:
1 2 3 4 5 6
2 -1 -2 -1 -1 -5

Expected output:
-1.000 2.000
1.000 4.000
Problem p00005 test case
Input:
8 6
50000000 30000000

Expected output:
2 24
10000000 150000000
Problem p00006 test case
Input:
w32nimda

Expected output:
admin23w
Problem p00007 test case
Input:
5

Expected output:
130000
Problem p00008 test case
Input:
35
1

Expected output:
4
4
Problem p00009 test case
Input:
10
3
11

Expected output:
4
2
5
Problem p00010 test case
Input:
1
0.0 0.0 2.0 0.0 2.0 2.0

Expected output:
1.000 1.000 1.414
Problem p00011 test case
Input:
5
4
2,4
3,5
1,2
3,4

Expected output:
4
1
2
5
3
Problem p00012 test case
Input:
0.0 0.0 2.0 0.0 2.0 2.0 1.5 0.5
0.0 0.0 1.0 4.0 5.0 3.0 -1.0 3.0

Expected output:
YES
NO
Problem p00013 test case
Input:
1
6
0
8
10
0
0
0

Expected output:
6
10
8
1
Problem p00014 test case
Input:
20
10

Expected output:
68440000
70210000
Problem p00015 test case
Input:
6
1000
800
9999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
1
99999999999999999999999999999999999999999999999999999999999999999999999999999999
0
100000000000000000000000000000000000000000000000000000000000000000000000000000000
1
100000000000000000000000000000000000000000000000000000000000000000000000000000000
100000000000000000000000000000000000000000000000000000000000000000000000000000000

Expected output:
1800
10000000000000000000000000000000000000000
overflow
99999999999999999999999999999999999999999999999999999999999999999999999999999999
overflow
overflow
Problem p00016 test case
Input:
56,65
97,54
64,-4
55,76
42,-27
43,80
87,-86
55,-6
89,34
95,5
0,0

Expected output:
171
-302
Problem p00017 test case
Input:
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.

Expected output:
this is the picture that i took in the trip.
Problem p00018 test case
Input:
3 6 9 7 5

Expected output:
9 7 6 5 3
Problem p00019 test case
Input:
5

Expected output:
120
Problem p00020 test case
Input:
this is a pen.

Expected output:
THIS IS A PEN.
Problem p00021 test case
Input:
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0

Expected output:
YES
NO
Problem p00022 test case
Input:
7
-5
-1
6
4
9
-6
-7
13
1
2
3
2
-2
-1
1
2
3
2
1
-2
1
3
1000
-200
201
0

Expected output:
19
14
1001
Problem p00023 test case
Input:
2
0.0 0.0 5.0 0.0 0.0 4.0
0.0 0.0 2.0 4.1 0.0 2.0

Expected output:
2
0
Problem p00024 test case
Input:
25.4
25.4

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

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

Expected output:
77
5
Problem p00027 test case
Input:
1 1
2 29
0 0

Expected output:
Thursday
Sunday
Problem p00028 test case
Input:
5
6
3
5
8
7
5
3
9
7
3
4

Expected output:
3
5
Problem p00029 test case
Input:
Thank you for your mail and your lectures

Expected output:
your lectures
Problem p00030 test case
Input:
3 6
3 1
0 0

Expected output:
3
0
Problem p00031 test case
Input:
5
7
127

Expected output:
1 4
1 2 4
1 2 4 8 16 32 64
Problem p00032 test case
Input:
3,4,5
5,5,8
4,4,4
5,4,3

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

Expected output:
YES
NO
Problem p00034 test case
Input:
1,1,1,1,1,1,1,1,1,1,40,60
1,1,1,1,1,3,3,3,3,3,50,50
10,10,10,10,10,10,10,10,10,10,50,49

Expected output:
4
7
6
Problem p00035 test case
Input:
0.0,0.0,1.0,0.0,1.0,1.0,0.0,1.0
0.0,0.0,3.0,0.0,1.0,1.0,1.0,3.0

Expected output:
YES
NO
Problem p00036 test case
Input:
00000000
00000000
01100000
00110000
00000000
00000000
00000000
00000000

00011110
00000000
00000000
00000000
00000000
00000000
00000000
00000000

00000000
00000000
00110000
00110000
00000000
00000000
00000000
00000000

Expected output:
E
C
A
Problem p00037 test case
Input:
1111
00001
0110
01011
0010
01111
0010
01001
0111

Expected output:
RRRRDDDDLLLUUURRDDLURULLDDDRRRUUUULLLL
Problem p00038 test case
Input:
1,2,3,4,1
2,3,2,3,12
12,13,11,12,12
7,6,7,6,7
3,3,2,3,3
6,7,8,9,10
11,12,10,1,13
11,12,13,1,2

Expected output:
one pair
two pair
three card
full house
four card
straight
straight
null
Problem p00039 test case
Input:
IV
CCCCLXXXXVIIII
CDXCIX

Expected output:
4
499
499
Problem p00040 test case
Input:
1
y eazqyp pnop pngtg ye obmpngt xmybp mr lygw

Expected output:
i submit that there is another point of view
Problem p00041 test case
Input:
8 7 9 9
4 4 4 4
5 5 7 5
0 0 0 0

Expected output:
((9 * (9 - 7)) - 8)
0
((7 * 5) - (5 * 5))
Problem p00042 test case
Input:
50
5
60,10
100,20
120,30
210,45
10,4
50
5
60,10
100,20
120,30
210,45
10,4
0

Expected output:
Case 1:
220
49
Case 2:
220
49
Problem p00043 test case
Input:
3649596966777
6358665788577
9118992346175
9643871425498
7755542764533
1133557799246

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

Expected output:
17 23
3511 3527
Problem p00045 test case
Input:
100,20
50,10
70,35

Expected output:
4950
22
Problem p00046 test case
Input:
3776.0
1819.0
645.2
2004.1
1208.6

Expected output:
3130.8
Problem p00047 test case
Input:
B,C
A,C
C,B
A,B
C,B

Expected output:
A
Problem p00048 test case
Input:
60.2
70.2
48.0
80.2

Expected output:
light welter
light middle
light fly
middle
Problem p00049 test case
Input:
1,B
2,A
3,B
4,AB
5,B
6,O
7,A
8,O
9,AB
10,A
11,A
12,B
13,AB
14,A

Expected output:
5
4
3
2
Problem p00050 test case
Input:
the cost of one peach is higher than that of one apple.

Expected output:
the cost of one apple is higher than that of one peach.
Problem p00051 test case
Input:
2
65539010
65539010

Expected output:
96417531
96417531
Problem p00052 test case
Input:
2
12
10000
0

Expected output:
0
2
2499
Problem p00053 test case
Input:
2
9
0

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

Expected output:
5
24
7
6
Problem p00055 test case
Input:
1.0
2.0
3.0

Expected output:
7.81481481
15.62962963
23.44444444
Problem p00056 test case
Input:
10
11
0

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

Expected output:
2
7
Problem p00058 test case
Input:
1.0 1.0 2.0 2.0 0.0 0.0 1.0 -1.0
0.0 0.0 2.0 0.0 -1.0 2.0 2.0 2.0
10.0 6.0 3.4 5.2 6.8 9.5 4.3 2.1
2.5 3.5 2.5 4.5 -3.3 -2.3 6.8 -2.3

Expected output:
YES
NO
NO
YES
Problem p00059 test case
Input:
0.0 0.0 5.0 5.0 1.0 1.0 4.0 4.0
0.0 0.0 4.0 5.0 1.0 1.0 5.0 5.0
0.0 0.0 4.0 4.0 -3.0 -5.0 2.0 -1.0

Expected output:
YES
YES
NO
Problem p00060 test case
Input:
1 2 3
5 6 9
8 9 10

Expected output:
YES
YES
NO
Problem p00061 test case
Input:
1,20
2,20
3,30
4,10
5,10
6,20
0,0
1
2
4
5

Expected output:
2
2
3
3
Problem p00062 test case
Input:
4823108376
1234567890
0123456789

Expected output:
5
6
4
Problem p00063 test case
Input:
abcba
sx
abcddcba
rttrd

Expected output:
2
Problem p00064 test case
Input:
Thereare100yenonthetable.Iam17yearsold.
Ishouldgohomeat6pm.

Expected output:
123
Problem p00065 test case
Input:
123,10
56,12
34,14

123,3
56,4
123,5

Expected output:
56 2
123 3
Problem p00066 test case
Input:
ooosxssxs
xoosxsosx
ooxxxooxo

Expected output:
o
x
d
Problem p00067 test case
Input:
111100001111
111000001111
110000001111
100000001111
000100010000
000000111000
000001111100
100011111110
110001111100
111000111000
111100010000
000000000000

010001111100
110010000010
010010000001
010000000001
010000000110
010000111000
010000000100
010000000010
010000000001
010010000001
010010000010
111001111100

000000000000
111111111111
100010100001
100010100001
100010100001
100010100001
100100100101
101000011101
100000000001
100000000001
111111111111
100000000001

Expected output:
5
13
4
Problem p00068 test case
Input:
4
1.0,0.0
0.0,1.0
2.0,1.0
1.0,2.0
9
-509.94,892.63
567.62,639.99
-859.32,-64.84
-445.99,383.69
667.54,430.49
551.12,828.21
-940.2,-877.2
-361.62,-970
-125.42,-178.48
0

Expected output:
0
3
Problem p00069 test case
Input:
5
2
3
9
1010
1001
0100
1001
0010
1000
0100
0101
1010
0

Expected output:
6 4
Problem p00070 test case
Input:
3 10
3 1

Expected output:
8
0
Problem p00071 test case
Input:
2

00010010
00000100
10001001
00100010
01000000
00001000
10100010
01010010
2
5

00010010
00000100
10001001
00100010
01000000
00001000
10100010
01010010
2
5

Expected output:
Data 1:
00000000
00000100
10001001
00100000
00000000
00001000
10100000
00000000
Data 2:
00000000
00000100
10001001
00100000
00000000
00001000
10100000
00000000
Problem p00072 test case
Input:
4
4
0,1,1500
0,2,2000
1,2,600
1,3,500
0

Expected output:
23
Problem p00073 test case
Input:
6
4
7
9
0
0

Expected output:
96.000000
184.192455
Problem p00074 test case
Input:
1 30 0
-1 -1 -1

Expected output:
00:30:00
01:30:00
Problem p00075 test case
Input:
1001,50.0,1.60
1002,60.0,1.70
1003,70.0,1.80
1004,80.0,1.70
1005,90.0,1.60

Expected output:
1004
1005
Problem p00076 test case
Input:
3
6
-1

Expected output:
0.29
1.71
-2.31
0.80
Problem p00077 test case
Input:
ab@5C1@8050
@99+1=1@90

Expected output:
abCCCCC10000000050
999999999+1=1000000000
Problem p00078 test case
Input:
3
5
0

Expected output:
   4   9   2
   3   5   7
   8   1   6
  11  24   7  20   3
   4  12  25   8  16
  17   5  13  21   9
  10  18   1  14  22
  23   6  19   2  15
Problem p00079 test case
Input:
0.0,0.0
0.0,1.0
1.0,1.0
2.0,0.0
1.0,-1.0

Expected output:
2.500000
Problem p00080 test case
Input:
15
15
-1

Expected output:
2.466212
2.466212
Problem p00081 test case
Input:
1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0

Expected output:
1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000
Problem p00082 test case
Input:
2 3 1 4 0 1 0 1
4 2 3 2 2 2 1 1

Expected output:
1 4 1 4 1 2 1 2
4 1 4 1 2 1 2 1
Problem p00083 test case
Input:
2005 9 3
1868 12 2
1868 9 7

Expected output:
heisei 17 9 3
meiji 1 12 2
pre-meiji
Problem p00084 test case
Input:
Rain, rain, go to Spain.

Expected output:
Rain rain Spain
Problem p00085 test case
Input:
41 3
30 9
0 0

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

Expected output:
OK
NG
Problem p00087 test case
Input:
10 2 12 - /
3 4 - 7 2 3 * + *
-1 -2 3 + +

Expected output:
-1.000000
-13.000000
0.000000
Problem p00088 test case
Input:
PETER POTTER

Expected output:
?D-C'KOPUA
Problem p00089 test case
Input:
7
3,8
8,1,0
2,7,4,4
4,5,2,6,5
2,7,4,4
8,1,0
3,8
7

Expected output:
55
Problem p00090 test case
Input:
15
3.14979,8.51743
2.39506,3.84915
2.68432,5.39095
5.61904,9.16332
7.85653,4.75593
2.84021,5.41511
1.79500,8.59211
7.55389,8.17604
4.70665,4.66125
1.63470,4.42538
7.34959,4.61981
5.09003,8.11122
5.24373,1.30066
0.13517,1.83659
7.57313,1.58150
0

Expected output:
4
Problem p00091 test case
Input:
2
0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 1 1 1 0 0 0 0 0
0 0 0 1 0 0 0 1 1 1
0 0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 1 1 1
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

Expected output:
3 2 1
8 4 2
Problem p00092 test case
Input:
10
...*....**
..........
**....**..
........*.
..*.......
..........
.*........
..........
....*..***
.*....*...
10
****.*****
*..*.*....
****.*....
*....*....
*....*****
..........
****.*****
*..*...*..
****...*..
*..*...*..
0

Expected output:
5
3
Problem p00093 test case
Input:
2001 2010
2005 2005
2001 2010
0 0

Expected output:
2004
2008

NA

2004
2008
Problem p00094 test case
Input:
15 25

Expected output:
113.437508
Problem p00095 test case
Input:
6
1 14
2 25
3 42
4 11
5 40
6 37

Expected output:
3 42
Problem p00096 test case
Input:
2
3
35

Expected output:
10
20
8436
Problem p00097 test case
Input:
3 6
3 1
0 0

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

Expected output:
16
Problem p00099 test case
Input:
3 5
1 4
2 5
1 3
3 6
2 7

Expected output:
1 4
2 5
1 7
1 7
2 12
Problem p00100 test case
Input:
4
1001 2000 520
1002 1800 450
1003 1600 625
1001 200 1220
2
1001 100 3
1005 1000 100
2
2013 5000 100
2013 5000 100
0

Expected output:
1001
1003
NA
2013
Problem p00101 test case
Input:
3
Hoshino
Hashino
Masayuki Hoshino was the grandson of Ieyasu Tokugawa.

Expected output:
Hoshina
Hashino
Masayuki Hoshina was the grandson of Ieyasu Tokugawa.
Problem p00102 test case
Input:
4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
4
52 96 15 20
86 22 35 45
45 78 54 36
16 86 74 55
0

Expected output:
   52   96   15   20  183
   86   22   35   45  188
   45   78   54   36  213
   16   86   74   55  231
  199  282  178  156  815
   52   96   15   20  183
   86   22   35   45  188
   45   78   54   36  213
   16   86   74   55  231
  199  282  178  156  815
Problem p00103 test case
Input:
2
HIT
OUT
HOMERUN
HIT
HIT
HOMERUN
HIT
OUT
HIT
HIT
HIT
HIT
OUT
HIT
HIT
OUT
HIT
OUT
OUT

Expected output:
7
0
Problem p00104 test case
Input:
10 10
>>>v..>>>v
...v..^..v
>>>>>>^..v
.........v
.v

Expected output:
5 7
LOOP
Problem p00105 test case
Input:
style 12
even 25
introduction 3
easy 9
style 7
document 13
style 21
even 18

Expected output:
document
13
easy
9
even
18 25
introduction
3
style
7 12 21
Problem p00106 test case
Input:
500
2200
0

Expected output:
850
3390
Problem p00107 test case
Input:
10 6 8
5
4
8
6
2
5
0 0 0

Expected output:
NA
OK
OK
NA
NA
Problem p00108 test case
Input:
10
4 5 1 1 4 5 12 3 5 4
0

Expected output:
3
6 6 4 4 6 6 4 4 6 6
Problem p00109 test case
Input:
2
4-2*3=
4*(8+4+3)=

Expected output:
-2
60
Problem p00110 test case
Input:
123+4X6=X79
12X+4X6=X79
XX22+89=X2XX

Expected output:
5
NA
1
Problem p00111 test case
Input:
?D-C'KOPUA

Expected output:
PETER POTTER
Problem p00112 test case
Input:
5
2
6
4
3
9
0

Expected output:
31
Problem p00113 test case
Input:
1 12
10000 32768
1 11100
1 459550

Expected output:
083
  ^
30517578125
00009
  ^^^
00000217604178
  ^^^^^^^^^^^^
Problem p00114 test case
Input:
2 5 3 7 6 13
517 1024 746 6561 4303 3125
0 0 0 0 0 0

Expected output:
12
116640000
Problem p00115 test case
Input:
-10 0 0
10 0 0
0 10 0
0 10 10
0 0 10

Expected output:
HIT
Problem p00116 test case
Input:
10 10
...*....**
..........
**....**..
........*.
..*.......
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
*****..*..
*...*..*..
*...*..*..
..........
****.*...*
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0

Expected output:
28
12
6
Problem p00117 test case
Input:
6
8
1,2,2,2
1,3,4,3
1,4,4,2
2,5,3,2
3,4,4,2
3,6,1,2
4,6,1,1
5,6,1,2
2,4,50,30

Expected output:
11
Problem p00118 test case
Input:
10 10
####*****@
@#@@@@#*#*
@##***@@@*
#****#*@**
##@*#@@*##
*@@@@*@@@#
***#@*@##*
*@@@*@@##@
*@*#*@##**
@****#@@#@
0 0

Expected output:
33
Problem p00119 test case
Input:
6
7
5 2
1 4
3 5
4 2
1 6
6 4
3 4

Expected output:
3
5
1
6
4
2
Problem p00120 test case
Input:
30 4 5 6
30 5 5 5
50 3 3 3 10 10
49 3 3 3 10 10

Expected output:
OK
OK
OK
NA
Problem p00121 test case
Input:
0 1 2 3 4 5 6 7
1 0 2 3 4 5 6 7
7 6 5 4 3 2 1 0

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

Expected output:
OK
NA
Problem p00123 test case
Input:
40.0 70.0
72.5 140.51

Expected output:
B
NA
Problem p00124 test case
Input:
4
Japan 1 0 2
Egypt 1 2 0
Canada 0 2 1
Spain 2 0 1
3
India 0 2 0
Poland 1 0 1
Italy 1 0 1
0

Expected output:
Spain,7
Japan,5
Egypt,3
Canada,1

Poland,4
Italy,4
India,0
Problem p00125 test case
Input:
2006 9 2 2006 9 3
2006 9 2 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1

Expected output:
1
70
366
2192
36890
Problem p00126 test case
Input:
2
2 1 3 4 5 6 7 8 9
4 5 6 7 8 9 1 2 3
7 8 9 1 2 3 4 5 6
2 3 4 5 6 7 8 9 1
5 6 7 8 9 1 2 3 4
8 9 1 2 3 4 5 6 7
3 4 5 6 7 8 9 1 2
6 7 8 9 1 2 3 4 5
9 1 2 3 4 5 6 7 8
2 1 3 4 5 6 7 8 9
4 5 6 7 8 9 1 2 3
7 8 9 1 2 3 4 5 6
2 3 4 5 6 7 8 9 1
5 6 7 8 9 1 2 3 4
8 9 1 2 3 4 5 6 7
3 4 5 6 7 8 9 1 2
6 7 8 9 1 2 3 4 5
9 1 2 3 4 5 6 7 8

Expected output:
*2*1 3 4 5 6 7 8 9
 4 5 6 7 8 9 1 2 3
 7 8 9 1 2 3 4 5 6
*2 3 4 5 6 7 8 9 1
 5 6 7 8 9 1 2 3 4
 8 9 1 2 3 4 5 6 7
 3 4 5 6 7 8 9 1 2
 6 7 8 9 1 2 3 4 5
 9*1 2 3 4 5 6 7 8

*2*1 3 4 5 6 7 8 9
 4 5 6 7 8 9 1 2 3
 7 8 9 1 2 3 4 5 6
*2 3 4 5 6 7 8 9 1
 5 6 7 8 9 1 2 3 4
 8 9 1 2 3 4 5 6 7
 3 4 5 6 7 8 9 1 2
 6 7 8 9 1 2 3 4 5
 9*1 2 3 4 5 6 7 8
Problem p00127 test case
Input:
341143514535
314
143565553551655311343411652235654535651124615163
551544654451431564
4
3411
6363636363
153414

Expected output:
naruto
NA
do you wanna go to aizu?
yes sure!
NA
na
?????
end
Problem p00128 test case
Input:
2006
1111

Expected output:
****
    *
=====
 *  *
****
* ***
*****
*****

*****

=====
 ****
*
*****
*****
*****
Problem p00129 test case
Input:
3
6 6 3
19 7 4
21 8 1
6
5 4 2 11
12 4 2 11
11 9 2 11
14 3 20 5
17 9 20 5
20 10 20 5
0

Expected output:
Safe
Safe
Danger
Safe
Danger
Safe
Problem p00130 test case
Input:
4
a->e->c->b->d
b

Expected output:
aecbd
edacb
bacde
bcdae
Problem p00131 test case
Input:
1
0 1 0 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 0 0 0 0
0 0 0 1 0 0 1 0 0 0
0 0 0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1 1 1
0 0 0 0 0 0 0 0 1 0

Expected output:
0 0 0 0 0 0 0 0 0 0
0 1 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 1 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 0
0 0 0 0 0 0 0 0 0 0
Problem p00132 test case
Input:
14 20
####################
###.............####
####..........######
#######.....########
########.....#######
###..###......######
###..####......#####
#########......#####
###########.....####
############.....###
###.########......##
###.#######...###.##
##...###....#####.##
####################
10
12 15
#############..
.##########....
....#####......
.....#####.....
.....######....
......######...
......######...
........#####..
.........#####.
.........######
........###...#
.....####.....#
3 3
#..
###
#..
2 2
##
##
4 10
....#####.
....######
...###...#
####.....#
6 5
....#
..###
#####
##.##
#..##
#..#.
6 4
...#
.###
####
##.#
##.#
#...
2 6
######
.#####
2 7
..#####
#######
2 13
#############
.##########..
6 9
#####....
.######..
.######..
..######.
...#####.
....#####
8
3 1 2 3
4 1 2 3 4
7 2 3 4 5 6 7 8
5 2 3 10 7 8
6 2 3 9 5 6 4
8 2 3 4 6 9 5 4 10
4 4 5 6 9
5 10 2 3 4 9
0 0

Expected output:
YES
NO
YES
NO
YES
NO
NO
YES
Problem p00133 test case
Input:
#*******
#*******
#*******
#*******
#*******
#*******
#*******
########

Expected output:
90
########
#*******
#*******
#*******
#*******
#*******
#*******
#*******
180
########
*******#
*******#
*******#
*******#
*******#
*******#
*******#
270
*******#
*******#
*******#
*******#
*******#
*******#
*******#
########
Problem p00134 test case
Input:
6
12300
5600
33800
0
26495
52000

Expected output:
21699
Problem p00135 test case
Input:
4
02:15
06:01
11:55
10:40

Expected output:
alert
safe
alert
warning
Problem p00136 test case
Input:
4
180.3
168.2
165.5
175.3

Expected output:
1:
2:**
3:
4:*
5:*
6:
Problem p00137 test case
Input:
2
123
567

Expected output:
Case 1:
151
228
519
2693
2522
3604
9888
7725
6756
6435
Case 2:
3214
3297
8702
7248
5335
4622
3628
1623
6341
2082
Problem p00138 test case
Input:
18 25.46
16 26.23
3 23.00
10 24.79
5 22.88
11 23.87
19 23.90
1 25.11
23 23.88
4 23.46
7 24.12
12 22.91
13 21.99
14 22.86
21 23.12
9 24.09
17 22.51
22 23.49
6 23.02
20 22.23
24 21.89
15 24.14
8 23.77
2 23.42

Expected output:
5 22.88
3 23.00
13 21.99
14 22.86
24 21.89
20 22.23
17 22.51
12 22.91
Problem p00139 test case
Input:
3
>'======#======~
>^Q=Q=Q=Q=Q=Q=Q=Q=Q=~~
>'===#====~

Expected output:
A
B
NA
Problem p00140 test case
Input:
2
2 4
4 2

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

Expected output:
#####
#   #
# # #
# # #
# ###

######
#    #
# ## #
# #  #
# #  #
# ####
Problem p00142 test case
Input:
11
15
0

Expected output:
4
4
4
4
4
2
2
4
2
4
4
2
Problem p00143 test case
Input:
5
2 5 9 2 8 9 2 11 6 5
2 5 9 2 8 9 2 11 12 6
2 5 9 2 8 9 2 11 11 9
14 1 25 7 17 12 17 9 20 5
14 1 25 7 17 12 22 13 20 5

Expected output:
OK
NG
NG
NG
OK
Problem p00144 test case
Input:
7
1 4 2 5 4 3
2 1 5
3 1 6
4 1 7
5 2 7 6
6 1 1
7 0
6
1 2 2
1 5 3
1 2 1
5 1 3
6 3 3
1 7 4

Expected output:
2
2
NA
3
3
3
Problem p00145 test case
Input:
3
3 5
2 8
5 4

Expected output:
440
Problem p00146 test case
Input:
2
1 100 1
2 200 2

Expected output:
1 2
Problem p00147 test case
Input:
5
6
7
8

Expected output:
0
14
9
4
Problem p00148 test case
Input:
50
5576
5577
5578

Expected output:
3C11
3C38
3C39
3C01
Problem p00149 test case
Input:
1.0 1.2
0.8 1.5
1.2 0.7
2.0 2.0

Expected output:
2 3
2 1
0 0
0 0
Problem p00150 test case
Input:
12
100
200
300
0

Expected output:
5 7
71 73
197 199
281 283
Problem p00151 test case
Input:
5
00011
00101
01000
10101
00010
8
11000001
10110111
01100111
01111010
11111111
01011010
10100010
10000001
2
01
00
3
000
000
000
0

Expected output:
4
8
1
0
Problem p00152 test case
Input:
3
1010 6 3 10 7 1 0 7 9 1 10 6 2 4 3 9 1 9 0
1200 5 3 9 1 7 1 0 0 8 1 10 10 4 3 9 1 8 2 9
1101 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
4
3321 8 2 10 9 1 7 0 10 10 10 0 8 10 10 10 10
3332 5 0 10 9 1 4 1 9 0 10 10 7 1 5 2 8 1
3335 10 10 10 10 10 10 10 10 10 10 10 10
3340 8 2 7 3 6 4 8 2 8 2 9 1 7 3 6 4 8 2 9 1 7
0

Expected output:
1200 127
1010 123
1101 60
3335 300
3321 200
3340 175
3332 122
Problem p00153 test case
Input:
1 1
3 1
3 3
3 2
3
3 12
9 3
11 12
8 7
5
15 3
17 7
22 5
7 6
4
6 11
8 2
16 9
10 8
2
0 0

Expected output:
b
c
d
a
Problem p00154 test case
Input:
5
1 10
5 3
10 3
25 2
50 2
4
120
500
100
168
7
1 10
3 10
5 10
10 10
25 10
50 10
100 10
3
452
574
787
0

Expected output:
16
0
12
7
9789
13658
17466
Problem p00155 test case
Input:
4
1 0 0
2 30 0
3 60 40
4 0 60
2
1 3
1 4
22
1 0 0
2 150 40
3 30 20
4 180 150
5 40 80
6 130 130
7 72 28
8 172 118
9 50 50
10 160 82
11 90 105
12 144 131
13 130 64
14 80 140
15 38 117
16 190 90
17 60 100
18 100 70
19 130 100
20 71 69
21 200 110
22 120 150
1
1 22
0

Expected output:
1 2 3
NA
1 3 9 20 11 6 22
Problem p00156 test case
Input:
5 5
.###.
#...#
#.&.#
#...#
.###.
18 15
..####....####....
####..####....####
#...............##
.#.############.##
#..#..........#.##
.#.#.########.#.##
#..#.#......#.#.##
.#.#....&...#.#.##
#..#........#.#.##
.#.#.########.#.##
#..#..........#.##
.#.############.##
#...............##
.#################
##################
9 10
#########
........#
#######.#
#.....#.#
#.###.#.#
#.#&#.#.#
#.#...#.#
#.#####.#
#.......#
#########
9 3
###...###
#.#.&.#.#
###...###
0 0

Expected output:
1
2
0
0
Problem p00157 test case
Input:
6
1 1
4 3
6 5
8 6
10 10
14 14
5
2 2
5 4
6 6
9 8
15 10
4
1 1
4 3
6 5
8 6
3
2 2
5 4
6 6
4
1 1
4 3
6 5
8 6
4
10 10
12 11
18 15
24 20
0

Expected output:
9
6
8
Problem p00158 test case
Input:
3
10
0

Expected output:
7
6
Problem p00159 test case
Input:
6
1 165 66
2 178 60
3 180 72
4 160 65
5 185 62
6 182 62
3
3 160 65
2 180 70
1 170 75
0

Expected output:
3
2
Problem p00160 test case
Input:
2
50 25 5 5
80 60 10 30
3
10 15 25 24
5 8 12 5
30 30 30 18
0

Expected output:
800
3800
Problem p00161 test case
Input:
8
34001 3 20 3 8 6 27 2 25
20941 3 5 2 41 7 19 2 42
90585 4 8 3 12 6 46 2 34
92201 3 28 2 47 6 37 2 58
10001 3 50 2 42 7 12 2 54
63812 4 11 3 11 6 53 2 22
54092 3 33 2 54 6 18 2 19
25012 3 44 2 58 6 45 2 46
4
1 3 23 1 23 1 34 4 44
2 5 12 2 12 3 41 2 29
3 5 24 1 24 2 0 3 35
4 4 49 2 22 4 41 4 23
0

Expected output:
54092
34001
10001
1
3
2
Problem p00162 test case
Input:
3 8
1 27
1 86
0

Expected output:
5
17
31
Problem p00163 test case
Input:
2
17 25
4
17 45
4
17 25
7
19 35
0

Expected output:
250
1300
Problem p00164 test case
Input:
4
3 1 4 2
3
4 3 2
0

Expected output:
31
28
26
25
21
17
16
14
11
8
6
5
1
0
31
27
26
23
21
19
16
12
11
8
6
4
1
0
Problem p00165 test case
Input:
4
5 0
9 1
3 10
11 3
1
999983 20
0

Expected output:
5
1
Problem p00166 test case
Input:
4
30
125
75
4
30
125
75
5
30
125
75
65
4
30
125
75
4
30
125
75
6
30
50
50
25
75
0

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

Expected output:
7
0
3
Problem p00168 test case
Input:
1
10
20
25
0

Expected output:
1
1
34
701
Problem p00169 test case
Input:
1
7 7 7
7 7 8
12 1
10 1 1
0

Expected output:
11
21
0
21
12