QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#116788 | #5537. Storing Eggs | berarchegas# | AC ✓ | 121ms | 24496kb | C++17 | 3.6kb | 2023-06-30 04:36:43 | 2023-06-30 04:36:47 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
mt19937 rng((int) chrono::steady_clock::now().time_since_epoch().count());
const int MOD = 1e9 + 7;
const int MAXN = 5e5 + 5;
const ll INF = 2e18;
const int maxn = 110;
const int inf = 1000000010;
int n, k;
int dp[maxn][maxn][maxn];
int maxDP[maxn][maxn][maxn][3];
string v[3];
bool possible()
{
int cnt = 0;
for(int i = 0 ; i < 3 ; i++)
for(int j = 0 ; j < n ; j++)
if( v[i][j] == '.' ) cnt++;
return ( cnt >= k );
}
bool hasMinDist(int a, int b, int c, int d, int r)
{
if( b == 0 || d == 0 )
return true;
int dx = a - c; dx *= dx;
int dy = b - d; dy *= dy;
return dx + dy >= r;
}
bool isValidState(int a, int b, int c, int r)
{
if( a > 0 && v[0][a - 1] == '#' )
return false;
if( b > 0 && v[1][b - 1] == '#' )
return false;
if( c > 0 && v[2][c - 1] == '#' )
return false;
if( !hasMinDist( 0 , a , 1 , b , r ) )
return false;
if( !hasMinDist( 0 , a , 2 , c , r ) )
return false;
if( !hasMinDist( 1 , b , 2 , c , r ) )
return false;
return true;
}
int calculateMin(int alpha, int beta, int r)
{
if( beta == 0 )
return 0;
r = max( r , alpha );
return beta + ceil(sqrt(r - alpha));
}
bool test(int r)
{
for(int a = n + 1 ; a >= 0 ; a--)
for(int b = n + 1 ; b >= 0 ; b--)
for(int c = n + 1 ; c >= 0 ; c--)
maxDP[a][b][c][0] = maxDP[a][b][c][1] = maxDP[a][b][c][2] = -inf;
for(int a = n ; a >= 0 ; a--)
{
for(int b = n ; b >= 0 ; b--)
{
for(int c = n ; c >= 0 ; c--)
{
int& ans = dp[a][b][c];
ans = -inf;
if( isValidState( a , b , c , r ) )
{
ans = 0;
int minA = max( {calculateMin(0,a,r), calculateMin(1,b,r), calculateMin(4,c,r)} );
minA = max( minA , 1 );
if( minA <= n )
ans = max( ans , maxDP[minA][b][c][0] + 1 );
int minB = max( {calculateMin(1,a,r), calculateMin(0,b,r), calculateMin(1,c,r)} );
minB = max( minB , 1 );
if( minB <= n )
ans = max( ans , maxDP[a][minB][c][1] + 1 );
int minC = max( {calculateMin(4,a,r), calculateMin(1,b,r), calculateMin(0,c,r)} );
minC = max( minC , 1 );
if( minC <= n )
ans = max( ans , maxDP[a][b][minC][2] + 1 );
}
maxDP[a][b][c][0] = max( maxDP[a + 1][b][c][0] , ans );
maxDP[a][b][c][1] = max( maxDP[a][b + 1][c][1] , ans );
maxDP[a][b][c][2] = max( maxDP[a][b][c + 1][2] , ans );
}
}
}
return dp[0][0][0] >= k;
}
int bs()
{
int l = 1, r = n*n + 100;
while( l < r )
{
int m = ( l + r )/2;
if( l == r - 1 ) m = r;
if( test(m) )
l = m;
else
r = m - 1;
}
return l;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n >> k;
for(int i = 0 ; i < 3 ; i++)
cin >> v[i];
if( !possible() )
{
cout << -1 << endl;
return 0;
}
cout << fixed << setprecision(12);
cout << sqrt(bs()) << endl;
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 7784kb
input:
5 2 #.... ..... ....#
output:
4.472135955000
result:
ok found '4.4721360', expected '4.4721360', error '0.0000000'
Test #2:
score: 0
Accepted
time: 2ms
memory: 7820kb
input:
5 6 ##.## ##### .....
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #3:
score: 0
Accepted
time: 1ms
memory: 5788kb
input:
3 4 ..# ... ...
output:
1.414213562373
result:
ok found '1.4142136', expected '1.4142140', error '0.0000003'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3424kb
input:
2 6 .. .# ..
output:
-1
result:
ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'
Test #5:
score: 0
Accepted
time: 1ms
memory: 5828kb
input:
1 2 . . .
output:
2.000000000000
result:
ok found '2.0000000', expected '2.0000000', error '0.0000000'
Test #6:
score: 0
Accepted
time: 74ms
memory: 24092kb
input:
100 2 .................................................................................................... .................................................................................................... ...............................................................................................
output:
99.020199959402
result:
ok found '99.0202000', expected '99.0202000', error '0.0000000'
Test #7:
score: 0
Accepted
time: 56ms
memory: 24036kb
input:
100 3 .................................................................................................... .................................................................................................... ...............................................................................................
output:
49.040799340957
result:
ok found '49.0407993', expected '49.0407990', error '0.0000000'
Test #8:
score: 0
Accepted
time: 114ms
memory: 23992kb
input:
100 100 .................................................................................................... .................................................................................................... .............................................................................................
output:
2.000000000000
result:
ok found '2.0000000', expected '2.0000000', error '0.0000000'
Test #9:
score: 0
Accepted
time: 120ms
memory: 24064kb
input:
100 150 .................................................................................................... .................................................................................................... .............................................................................................
output:
1.414213562373
result:
ok found '1.4142136', expected '1.4142140', error '0.0000003'
Test #10:
score: 0
Accepted
time: 106ms
memory: 24256kb
input:
100 151 .................................................................................................... .................................................................................................... .............................................................................................
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #11:
score: 0
Accepted
time: 100ms
memory: 23948kb
input:
100 200 .................................................................................................... .................................................................................................... .............................................................................................
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #12:
score: 0
Accepted
time: 108ms
memory: 24092kb
input:
100 201 .................................................................................................... .................................................................................................... .............................................................................................
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #13:
score: 0
Accepted
time: 18ms
memory: 19084kb
input:
60 130 ............................................................ ............................................................ ............................................................
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #14:
score: 0
Accepted
time: 55ms
memory: 24100kb
input:
100 100 .................................................................................................... #################################################################################################### .............................................................................................
output:
2.000000000000
result:
ok found '2.0000000', expected '2.0000000', error '0.0000000'
Test #15:
score: 0
Accepted
time: 42ms
memory: 23984kb
input:
100 51 #################################################################################################### .................................................................................................... ###########################################################################################...
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #16:
score: 0
Accepted
time: 1ms
memory: 3404kb
input:
1 2 # # #
output:
-1
result:
ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'
Test #17:
score: 0
Accepted
time: 41ms
memory: 23936kb
input:
99 50 ################################################################################################### ................................................................................................... ##############################################################################################...
output:
2.000000000000
result:
ok found '2.0000000', expected '2.0000000', error '0.0000000'
Test #18:
score: 0
Accepted
time: 60ms
memory: 24012kb
input:
100 47 #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. .#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.# #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#...
output:
2.828427124746
result:
ok found '2.8284271', expected '2.8284270', error '0.0000000'
Test #19:
score: 0
Accepted
time: 60ms
memory: 23996kb
input:
100 43 .#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.# #.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#. .#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....
output:
2.828427124746
result:
ok found '2.8284271', expected '2.8284270', error '0.0000000'
Test #20:
score: 0
Accepted
time: 62ms
memory: 23960kb
input:
99 2 #........#............#.#.#...................................#................##..............#... ............................##...#......#...##.............#.........#..#...#............#...#..... #...............................................#..............#.....#.........#.........#........
output:
98.005101908013
result:
ok found '98.0051019', expected '98.0051020', error '0.0000000'
Test #21:
score: 0
Accepted
time: 33ms
memory: 21356kb
input:
90 2 #############..######.###.##.#########.###.###########.####.############################## #...##########.#.#################.############.########################.################# ###################.###.##.####.#######..##.########.#############################.#######
output:
81.006172604315
result:
ok found '81.0061726', expected '81.0061730', error '0.0000000'
Test #22:
score: 0
Accepted
time: 52ms
memory: 23780kb
input:
95 3 #.#..............#.............#.......#..##.....#.#............#....#..................##..... .....#.#........#...#...........#......................#...#.....#.........#.....#...........#. #.......#.#....#.......#.......#.......#..#.#.#.#....#.#...#..#......#........#..........#....#
output:
47.010637094173
result:
ok found '47.0106371', expected '47.0106370', error '0.0000000'
Test #23:
score: 0
Accepted
time: 36ms
memory: 23500kb
input:
92 3 #########################.###########################.####################################.# #######.##############.#.#################.#########.########.#############################. ###.##.####.###.####.#####.########.#########.########.##.#######.##########################
output:
42.000000000000
result:
ok found '42.0000000', expected '42.0000000', error '0.0000000'
Test #24:
score: 0
Accepted
time: 48ms
memory: 23552kb
input:
93 4 ##..#.......................#.....#.#.#..............#.....#........#.....................#.. ......#...................#..##...................#...............###.....#....#..........#.# #......#.........#....#.................#......#...#......##..........#.........#.#..#.#..#.#
output:
30.066592756746
result:
ok found '30.0665928', expected '30.0665930', error '0.0000000'
Test #25:
score: 0
Accepted
time: 34ms
memory: 23524kb
input:
92 4 ###.###############.######.##.#########################.######.###.#####.################### #.##..#####################.###########################.########..###############.#######... #######################.###.############.##..####.#################.#.#..####.##############
output:
28.017851452244
result:
ok found '28.0178515', expected '28.0178510', error '0.0000000'
Test #26:
score: 0
Accepted
time: 62ms
memory: 23612kb
input:
94 5 #........#....#.................................................#.....................#....... #................#...............#..##..................#........#.......#...#................ ##..................................................##................#.......#...............
output:
23.021728866443
result:
ok found '23.0217289', expected '23.0217290', error '0.0000000'
Test #27:
score: 0
Accepted
time: 1ms
memory: 5760kb
input:
1 2 # . .
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #28:
score: 0
Accepted
time: 29ms
memory: 24384kb
input:
94 5 ##..#.######.##.########.#####.#####.############..##.##############################..######## #######.########.##########.#..################.####.#.###...######..##.###################### ######.############.######.#####################.################.##.##############.##########
output:
18.027756377320
result:
ok found '18.0277564', expected '18.0277560', error '0.0000000'
Test #29:
score: 0
Accepted
time: 56ms
memory: 23724kb
input:
90 6 #.................#....................#................#.#.........###................... ....................................#........#...................#...##...##....#.....#... #.#...........#...#........#..#....#.#....................#.........#.....................
output:
17.117242768624
result:
ok found '17.1172428', expected '17.1172430', error '0.0000000'
Test #30:
score: 0
Accepted
time: 47ms
memory: 23952kb
input:
100 6 ##########.##.##################.###########.###########.##.######################.####.##.######### ##########...#########.#.########.#################.#.###########.#.##########.#.##.################ ##############.#####..#######..##################.#######################.########.#########...
output:
16.031219541881
result:
ok found '16.0312195', expected '16.0312200', error '0.0000000'
Test #31:
score: 0
Accepted
time: 63ms
memory: 24492kb
input:
92 7 #.#....#..#...#.......#.........................................#.......#...#.............#. ...............#......#............#...#.........................#.....#..............#..... #..#......#...............#.................#....#............................#.............
output:
15.132745950422
result:
ok found '15.1327460', expected '15.1327460', error '0.0000000'
Test #32:
score: 0
Accepted
time: 43ms
memory: 21456kb
input:
92 7 ##.###########..######.###############.#.##.#################.##.#############.######.###.## #############.###############.##..#####################.######.#..#########.###.############ .###.########.###################.########.###################..#######...#########.#####.##
output:
14.035668847618
result:
ok found '14.0356688', expected '14.0356690', error '0.0000000'
Test #33:
score: 0
Accepted
time: 63ms
memory: 21508kb
input:
91 8 #..................#..#..............#......................#.......#..........#...#..#.... #....#.#.....#..#......#.....#.................#..#...........................#.........#.. #.......#......#..........#............#.....#...................#..............#.....#....
output:
12.165525060596
result:
ok found '12.1655251', expected '12.1655250', error '0.0000000'
Test #34:
score: 0
Accepted
time: 39ms
memory: 23668kb
input:
93 8 ############.###########.#######################.############.##.###.######################.# ############.####.###########.#######.####.##########.#######.####.###################.####.. #####.#######.###########.#####.#############.#.##################.##########################
output:
8.062257748299
result:
ok found '8.0622577', expected '8.0622580', error '0.0000000'
Test #35:
score: 0
Accepted
time: 107ms
memory: 24120kb
input:
100 109 ..#.....#..............#....................#..#.......#.............#................#.#........... #............##.........#..........#.#....#...............#...#.......#................#...........# .....#..#......#................................................................#............
output:
1.414213562373
result:
ok found '1.4142136', expected '1.4142140', error '0.0000003'
Test #36:
score: 0
Accepted
time: 77ms
memory: 23892kb
input:
97 13 ..##...#..........#.........##....##......#............#..........###........#.....#.........#... ##..#....#.............#....#...#.##............#........#.#.#.....................#.......#..#.. ........#..#....##.........#.#....#.....#.......#.#...................#......#.......#......##...
output:
8.062257748299
result:
ok found '8.0622577', expected '8.0622580', error '0.0000000'
Test #37:
score: 0
Accepted
time: 93ms
memory: 24060kb
input:
100 50 ....#......#..................#.......#..#.....#........#.........#......#....#............##....... #.....##........#.#...........##..#....##....#.#.........##....#.##...........#..................... ......##........#...#....#...#...#............#.......##.#..........##......##....##..#...#...
output:
2.236067977500
result:
ok found '2.2360680', expected '2.2360680', error '0.0000000'
Test #38:
score: 0
Accepted
time: 1ms
memory: 3544kb
input:
1 3 # . .
output:
-1
result:
ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'
Test #39:
score: 0
Accepted
time: 73ms
memory: 23576kb
input:
92 107 ..#........#...#...#.....#....#........#...#.......#.........#..#.........#...##.......##.#. ..##.......#..#....##.#..##.#.##........#............#..#.......#..##..............#....#... #...#.....#..........#........#.....##.#.................#....##...........#............#...
output:
1.414213562373
result:
ok found '1.4142136', expected '1.4142140', error '0.0000003'
Test #40:
score: 0
Accepted
time: 65ms
memory: 23800kb
input:
95 125 ...##.......#..#.#.............#..##...#..................#......#...##..#.....##....#.......#. .........#.....#.#....#....#..##.....#...#...#......#...........##..#........#.#...#.#........# .#..#....................##.........#...#...........#...........#...#...#..........##.....#.##.
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #41:
score: 0
Accepted
time: 37ms
memory: 23580kb
input:
93 20 ############################################################################################# .#.....#.......###.#..#.###....#...............##...#.....#..#...#...........#.....#....#..#. ....##.....#....#.#......#......#...........#.....#................#......#...#.##........#..
output:
4.123105625618
result:
ok found '4.1231056', expected '4.1231060', error '0.0000001'
Test #42:
score: 0
Accepted
time: 42ms
memory: 23916kb
input:
97 21 ################################################################################################# ################################################################################################# ......###........#.....#...#.#.........##.#......#.####.##......#....#........#...##....#......#.
output:
4.000000000000
result:
ok found '4.0000000', expected '4.0000000', error '0.0000000'
Test #43:
score: 0
Accepted
time: 47ms
memory: 23552kb
input:
93 7 #...#..##..#..#....#...#......#...####.###..##.##.#..#.#.###.##......#..###....#.#..#.#.#...# .#.#....##..##.##.#...##..##.#..............####.....##.#.#.#.#.#..##....#...#.#.#.......#... ###.###......#.#.#.#...###....#.#.##..#..#...#...#.##.#..##...#.####.#..##.#.###....#.#...#.#
output:
15.132745950422
result:
ok found '15.1327460', expected '15.1327460', error '0.0000000'
Test #44:
score: 0
Accepted
time: 50ms
memory: 23828kb
input:
91 15 .##.#..#......#.#####..###....##..#.#...#..##..#.##.....#....#.######.#.#.#......##..##..#. ..#..########....#..#...#.###.#............#.#.#..#..#..#.#.##...##....###.#...#.###..####. ...#.##..####..#.#.#.....#.#..#.#...##.##.#....#....#..#..##.......#####..###.#.#.#.##...#.
output:
6.324555320337
result:
ok found '6.3245553', expected '6.3245550', error '0.0000001'
Test #45:
score: 0
Accepted
time: 66ms
memory: 23900kb
input:
98 58 .#..##.....#............###.#####.##.....#.#..#.#.....####..##.##.#.......##...##..#..#....#..#..# #.#.##.#.#...#.....###...#....##..#..#...#####.##.#.#..#.#.##.#...####.##.#.....###.##.###.#....#. ....#..##..##.##..##...#..#....#.......###...#....#.##..#...#..#.....#....#.#.......####.#.#..#.#.
output:
2.236067977500
result:
ok found '2.2360680', expected '2.2360680', error '0.0000000'
Test #46:
score: 0
Accepted
time: 41ms
memory: 21448kb
input:
92 92 .#.#####.......##.##.....#####.....#..#..##.#..###..###.#..#..#.###..##...##..#.#.##..#..... #..#...#..........##.##.#.#..#.#..#..##..#...#..###.#.#....#..#.#..#..#.##........#....##.## .........####..#...#.....###...###.##..#.##.#####...##...##.#....#.##..##.##.######.#.#...#.
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #47:
score: 0
Accepted
time: 31ms
memory: 23652kb
input:
94 40 ############################################################################################## .#.........#.....##.########..#.....##..###..##.#.#..#.####..##...#..#..#....##.#..#....####.# ...#..#.##.#......#......####.....#.#..#.#.#..###.#..#.......##.#.###.#..##......#####.#..#..#
output:
2.000000000000
result:
ok found '2.0000000', expected '2.0000000', error '0.0000000'
Test #48:
score: 0
Accepted
time: 44ms
memory: 23780kb
input:
95 21 ############################################################################################### ############################################################################################### ..#..#.#....#.#..##.##..#.#.#.##.#.......##.#...#...#.##...#..#..###.#...#......#..##.......#.#
output:
4.000000000000
result:
ok found '4.0000000', expected '4.0000000', error '0.0000000'
Test #49:
score: 0
Accepted
time: 2ms
memory: 7852kb
input:
1 3 . . .
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #50:
score: 0
Accepted
time: 47ms
memory: 24056kb
input:
99 4 #...##.#.####.############.##.###..###.###.##.#.###.#####..#.#..#..#.#..###..##...#.#.#..########## .##..##.###..##.#.#.#######..##...###..#.##.#.##..#...###...#.###...#####.######..#..########.##.#. #######.##.####..##.##.#...#.###.###..####..###.######..###.##.#.#..#..#.#.###.#.###.#######.##...
output:
32.015621187164
result:
ok found '32.0156212', expected '32.0156210', error '0.0000000'
Test #51:
score: 0
Accepted
time: 55ms
memory: 24056kb
input:
100 12 #.###.####...######.###.########.#.##.#..#......##...#####.#.#..#.#..##.##.#.##.###.##.#########..## #.###..###.#####.##.#..##..#.###....###...##.##.#..#.#.#.##....#..#.#.#####.#.#########..#.#..#..### #.#.######.########...#...##.#..#.##.####..#.#.#..#.###...#.#.#..###....#...####.#.##..###....
output:
8.246211251235
result:
ok found '8.2462113', expected '8.2462110', error '0.0000000'
Test #52:
score: 0
Accepted
time: 54ms
memory: 24356kb
input:
100 36 ..######.#.#####.##.##.#.#######.####.#.######.##.#...####.####....##.#.....##..#########..###.#.### ##.######.#.###.####.##..#..##.##..#.#######.##.######.#...#.##.##.#.#..#..####.###.#..#####.#.####. ##.###.#..#.#####.#....###..#....#.#...#...#.##..###.##.########.##.##.########.#####.####....
output:
2.236067977500
result:
ok found '2.2360680', expected '2.2360680', error '0.0000000'
Test #53:
score: 0
Accepted
time: 43ms
memory: 23784kb
input:
97 74 ..####.#..#.###.##...##.#########...#.....##.##.#####.#.###..##..##...###.#.##...####...##.###.## ..##....#.##.###.###..###..#..#..#####.###..#.##..#####.####.###..##.##...#..###.#####.########.# ...##.#.###.#.##.####.#..##.###.######..#.####.####..########..##.#.###..##..###..#..##.#.##..##.
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #54:
score: 0
Accepted
time: 40ms
memory: 23924kb
input:
97 28 ################################################################################################# .###.##.##...########.##.###.#..#.###.#.#..#.##..##.#.##...##..#...##....#...##########.#####.### .##.#####..##..#.####.##.#.###.###....##.##.########..###.####..####.###.##..#.#..###..####....##
output:
2.236067977500
result:
ok found '2.2360680', expected '2.2360680', error '0.0000000'
Test #55:
score: 0
Accepted
time: 35ms
memory: 23564kb
input:
90 13 ########################################################################################## ########################################################################################## .##.###..####.####.###..###..###..#.##.#.##..###.###.###..#.#.####.#.###.#..#.######.....#
output:
5.000000000000
result:
ok found '5.0000000', expected '5.0000000', error '0.0000000'
Test #56:
score: 0
Accepted
time: 36ms
memory: 24196kb
input:
94 4 ###.#############..####..#.####.#####.################.####.#######..######.######.########### .##############.#####.###.####.##..##########.#.##########.#####.##.####.#####.######.######## #.######.#######..###.########.##.##########.##########.####.######.##..##.##.#####.###.######
output:
28.071337695236
result:
ok found '28.0713377', expected '28.0713380', error '0.0000000'
Test #57:
score: 0
Accepted
time: 49ms
memory: 23984kb
input:
100 9 ###########.######.#.#.#.###.#####..##.###########..#######.#..####..############.#..#..#.##.####### .####.##..#.####.#####.##.###.###.################.####.###.##..############################.##.#### ###.######...####..#####.#..#.##.##.#.##..#######.#######.#####..############.#####.##.#####...
output:
9.219544457293
result:
ok found '9.2195445', expected '9.2195440', error '0.0000000'
Test #58:
score: 0
Accepted
time: 41ms
memory: 23896kb
input:
93 27 ##..###.#.#.#####.#############.###.###############.##.##.###########.#.#######..####.#..#### ####.#.#####.#.###..####.##.##.#..####.#..##########..######.#########.######.##########..##. #####...#####################...####.##.#.#####.######.#.###.##.#..########.#.###.#.####..#.#
output:
2.236067977500
result:
ok found '2.2360680', expected '2.2360680', error '0.0000000'
Test #59:
score: 0
Accepted
time: 32ms
memory: 21500kb
input:
93 34 #######.#######.##.#.#.#####.##.#################.########...#######.#.#.#..#.##########.#### ###...########.##########.##.########.#..##.####.##.#####..######..###.#####..#.###.####.#### #######.#########.#..#####.##.####.##.###.##.###.##.#.#...###.#.######.#####.###.##########.#
output:
2.236067977500
result:
ok found '2.2360680', expected '2.2360680', error '0.0000000'
Test #60:
score: 0
Accepted
time: 1ms
memory: 5832kb
input:
3 3 .## .## .##
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #61:
score: 0
Accepted
time: 42ms
memory: 23572kb
input:
94 14 ############################################################################################## ##.#####.####.###.########.########.##.##.#######.##.#..#.#####.#.#.###########.#####.##.###.# #.#.############.############.###.######..##.#######.##.###.####..#.#####.#####.######..#.#.##
output:
5.099019513593
result:
ok found '5.0990195', expected '5.0990200', error '0.0000001'
Test #62:
score: 0
Accepted
time: 44ms
memory: 24112kb
input:
100 4 #################################################################################################### #################################################################################################### #########..###.####..#.####..#.##.#########.#.####..########.####.#.##.######..#####.#####.....
output:
25.000000000000
result:
ok found '25.0000000', expected '25.0000000', error '0.0000000'
Test #63:
score: 0
Accepted
time: 1ms
memory: 3408kb
input:
99 208 .......###.##........###.....#...#.##..#.##.#.....#...#.#........#...##..##..#........#.###.#.#..#. ........#.##.#.#.....#..............###....#.........#.#....#..#........#.#..#.#..........#.#..#..# #.##...#....#.##.#....##.#..#...#.##.#...##...#.#.#......#.....####.#.#.#.....#..#..#...#.......
output:
-1
result:
ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'
Test #64:
score: 0
Accepted
time: 56ms
memory: 23924kb
input:
100 30 ##################################################...##.#........#.###.#..#.......#..#....########## ........................................########..#..........#..#..###......#..........#..########## ################################################..#...##.........##.#..#.##....#..........#...
output:
2.828427124746
result:
ok found '2.8284271', expected '2.8284270', error '0.0000000'
Test #65:
score: 0
Accepted
time: 48ms
memory: 24100kb
input:
100 30 .#..######..###..#######.#######...#.###.##.###.#.#..##.#######.#...............##.##.######.###...# #.....#..#..####..####.##...##.#####..####..##..#..####..#####......#.....#.....########...###.#.### .#.#.#.###.#...#..##.####..####.#.##..####..####.###..########.....#...#.......####.##.####...
output:
3.000000000000
result:
ok found '3.0000000', expected '3.0000000', error '0.0000000'
Test #66:
score: 0
Accepted
time: 98ms
memory: 24000kb
input:
100 281 ..............................................................................................###### ..............................................................................................###### .............................................................................................
output:
1.000000000000
result:
ok found '1.0000000', expected '1.0000000', error '0.0000000'
Test #67:
score: 0
Accepted
time: 121ms
memory: 23944kb
input:
99 149 ................................................................................................... ................................................................................................... ................................................................................................
output:
1.414213562373
result:
ok found '1.4142136', expected '1.4142140', error '0.0000003'
Test #68:
score: 0
Accepted
time: 119ms
memory: 24496kb
input:
100 150 .................................................................................................... .................................................................................................... .............................................................................................
output:
1.414213562373
result:
ok found '1.4142136', expected '1.4142140', error '0.0000003'