QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#708619#5537. Storing Eggshydrolyzed_AC ✓441ms9072kbC++232.0kb2024-11-04 00:57:512024-11-04 00:57:51

Judging History

This is the latest submission verdict.

  • [2024-11-04 00:57:51]
  • Judged
  • Verdict: AC
  • Time: 441ms
  • Memory: 9072kb
  • [2024-11-04 00:57:51]
  • Submitted

answer

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const int MxN = 110;

int n, k, dp[MxN][MxN][MxN], p[4];
char a[4][MxN];

int DP(int i, int j, int k) {
  if(i < 0 || j < 0 || k < 0) {
    return -1e9 - 100;
  }
  if(i == 0 && j == 0 && k == 0) {
    return 0;
  }
  if(dp[i][j][k] != -1) {
    return dp[i][j][k];
  }
  dp[i][j][k] = max({DP(i - 1, j, k), DP(i, j - 1, k), DP(i, j, k - 1)});
  if(i > 0 && a[1][i] == '.') {
    int x = min(i, max(0, i - p[0]));
    int y = min(j, max(0, i - p[1]));
    int z = min(k, max(0, i - p[2]));
    dp[i][j][k] = max(dp[i][j][k], 1 + DP(x, y, z));
  }
  if(j > 0 && a[2][j] == '.') {
    int x = min(i, max(0, j - p[1]));
    int y = min(j, max(0, j - p[0]));
    int z = min(k, max(0, j - p[1]));
    dp[i][j][k] = max(dp[i][j][k], 1 + DP(x, y, z));
  }
  if(k > 0 && a[3][k] == '.') {
    int x = min(i, max(0, k - p[2]));
    int y = min(j, max(0, k - p[1]));
    int z = min(k, max(0, k - p[0]));
    dp[i][j][k] = max(dp[i][j][k], 1 + DP(x, y, z));
  }
  return dp[i][j][k];
}

bool ok(int mid) {
  for(int i=0; i<=n; ++i) {
    for(int j=0; j<=n; ++j) {
      for(int k=0; k<=n; ++k) {
        dp[i][j][k] = -1;
      }
    }
  }
  for(int i=0; i<3; ++i) {
    int l = 0, r = n;
    while(l < r) {
      int md = (l + r) >> 1;
      if(md * md >= mid - i * i) {
        r = md;
      }
      else {
        l = md + 1;
      }
    }
    p[i] = l;
  }
  return DP(n, n, n) >= k;
}

signed main(int argc, char *argv[]) {
  cin.tie(nullptr)->ios::sync_with_stdio(false);
  cin >> n >> k;
  int remains = k;
  for(int i=1; i<=3; ++i) {
    for(int j=1; j<=n; ++j) {
      cin >> a[i][j];
      remains -= (a[i][j] == '.');
    }
  }
  if(remains > 0) {
    cout << -1 << "\n";
    return 0;
  }
  int l = 1, r = 20020;
  while(l < r) {
    int mid = (l + r + 1) >> 1;
    if(ok(mid)) {
      l = mid;
    }
    else {
      r = mid - 1;
    }
  }
  cout << fixed << setprecision(7) << sqrt(l) << "\n";
  return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3996kb

input:

5 2
#....
.....
....#

output:

4.4721360

result:

ok found '4.4721360', expected '4.4721360', error '0.0000000'

Test #2:

score: 0
Accepted
time: 0ms
memory: 5904kb

input:

5 6
##.##
#####
.....

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3936kb

input:

3 4
..#
...
...

output:

1.4142136

result:

ok found '1.4142136', expected '1.4142140', error '0.0000003'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

2 6
..
.#
..

output:

-1

result:

ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

1 2
.
.
.

output:

2.0000000

result:

ok found '2.0000000', expected '2.0000000', error '0.0000000'

Test #6:

score: 0
Accepted
time: 362ms
memory: 8736kb

input:

100 2
....................................................................................................
....................................................................................................
...............................................................................................

output:

99.0202000

result:

ok found '99.0202000', expected '99.0202000', error '0.0000000'

Test #7:

score: 0
Accepted
time: 408ms
memory: 8768kb

input:

100 3
....................................................................................................
....................................................................................................
...............................................................................................

output:

49.0407993

result:

ok found '49.0407993', expected '49.0407990', error '0.0000000'

Test #8:

score: 0
Accepted
time: 437ms
memory: 8704kb

input:

100 100
....................................................................................................
....................................................................................................
.............................................................................................

output:

2.0000000

result:

ok found '2.0000000', expected '2.0000000', error '0.0000000'

Test #9:

score: 0
Accepted
time: 436ms
memory: 8744kb

input:

100 150
....................................................................................................
....................................................................................................
.............................................................................................

output:

1.4142136

result:

ok found '1.4142136', expected '1.4142140', error '0.0000003'

Test #10:

score: 0
Accepted
time: 441ms
memory: 8564kb

input:

100 151
....................................................................................................
....................................................................................................
.............................................................................................

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #11:

score: 0
Accepted
time: 434ms
memory: 8624kb

input:

100 200
....................................................................................................
....................................................................................................
.............................................................................................

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #12:

score: 0
Accepted
time: 441ms
memory: 8748kb

input:

100 201
....................................................................................................
....................................................................................................
.............................................................................................

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #13:

score: 0
Accepted
time: 92ms
memory: 6708kb

input:

60 130
............................................................
............................................................
............................................................

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #14:

score: 0
Accepted
time: 378ms
memory: 8732kb

input:

100 100
....................................................................................................
####################################################################################################
.............................................................................................

output:

2.0000000

result:

ok found '2.0000000', expected '2.0000000', error '0.0000000'

Test #15:

score: 0
Accepted
time: 317ms
memory: 8680kb

input:

100 51
####################################################################################################
....................................................................................................
###########################################################################################...

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

1 2
#
#
#

output:

-1

result:

ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'

Test #17:

score: 0
Accepted
time: 307ms
memory: 8668kb

input:

99 50
###################################################################################################
...................................................................................................
##############################################################################################...

output:

2.0000000

result:

ok found '2.0000000', expected '2.0000000', error '0.0000000'

Test #18:

score: 0
Accepted
time: 371ms
memory: 8736kb

input:

100 47
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#...

output:

2.8284271

result:

ok found '2.8284271', expected '2.8284270', error '0.0000000'

Test #19:

score: 0
Accepted
time: 367ms
memory: 8736kb

input:

100 43
.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#
#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.
.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#.#....

output:

2.8284271

result:

ok found '2.8284271', expected '2.8284270', error '0.0000000'

Test #20:

score: 0
Accepted
time: 345ms
memory: 8368kb

input:

99 2
#........#............#.#.#...................................#................##..............#...
............................##...#......#...##.............#.........#..#...#............#...#.....
#...............................................#..............#.....#.........#.........#........

output:

98.0051019

result:

ok found '98.0051019', expected '98.0051020', error '0.0000000'

Test #21:

score: 0
Accepted
time: 202ms
memory: 8756kb

input:

90 2
#############..######.###.##.#########.###.###########.####.##############################
#...##########.#.#################.############.########################.#################
###################.###.##.####.#######..##.########.#############################.#######

output:

81.0061726

result:

ok found '81.0061726', expected '81.0061730', error '0.0000000'

Test #22:

score: 0
Accepted
time: 330ms
memory: 8408kb

input:

95 3
#.#..............#.............#.......#..##.....#.#............#....#..................##.....
.....#.#........#...#...........#......................#...#.....#.........#.....#...........#.
#.......#.#....#.......#.......#.......#..#.#.#.#....#.#...#..#......#........#..........#....#

output:

47.0106371

result:

ok found '47.0106371', expected '47.0106370', error '0.0000000'

Test #23:

score: 0
Accepted
time: 204ms
memory: 8184kb

input:

92 3
#########################.###########################.####################################.#
#######.##############.#.#################.#########.########.#############################.
###.##.####.###.####.#####.########.#########.########.##.#######.##########################

output:

42.0000000

result:

ok found '42.0000000', expected '42.0000000', error '0.0000000'

Test #24:

score: 0
Accepted
time: 319ms
memory: 8224kb

input:

93 4
##..#.......................#.....#.#.#..............#.....#........#.....................#..
......#...................#..##...................#...............###.....#....#..........#.#
#......#.........#....#.................#......#...#......##..........#.........#.#..#.#..#.#

output:

30.0665928

result:

ok found '30.0665928', expected '30.0665930', error '0.0000000'

Test #25:

score: 0
Accepted
time: 210ms
memory: 8208kb

input:

92 4
###.###############.######.##.#########################.######.###.#####.###################
#.##..#####################.###########################.########..###############.#######...
#######################.###.############.##..####.#################.#.#..####.##############

output:

28.0178515

result:

ok found '28.0178515', expected '28.0178510', error '0.0000000'

Test #26:

score: 0
Accepted
time: 372ms
memory: 8432kb

input:

94 5
#........#....#.................................................#.....................#.......
#................#...............#..##..................#........#.......#...#................
##..................................................##................#.......#...............

output:

23.0217289

result:

ok found '23.0217289', expected '23.0217290', error '0.0000000'

Test #27:

score: 0
Accepted
time: 1ms
memory: 3920kb

input:

1 2
#
.
.

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #28:

score: 0
Accepted
time: 242ms
memory: 8328kb

input:

94 5
##..#.######.##.########.#####.#####.############..##.##############################..########
#######.########.##########.#..################.####.#.###...######..##.######################
######.############.######.#####################.################.##.##############.##########

output:

18.0277564

result:

ok found '18.0277564', expected '18.0277560', error '0.0000000'

Test #29:

score: 0
Accepted
time: 301ms
memory: 8068kb

input:

90 6
#.................#....................#................#.#.........###...................
....................................#........#...................#...##...##....#.....#...
#.#...........#...#........#..#....#.#....................#.........#.....................

output:

17.1172428

result:

ok found '17.1172428', expected '17.1172430', error '0.0000000'

Test #30:

score: 0
Accepted
time: 288ms
memory: 8880kb

input:

100 6
##########.##.##################.###########.###########.##.######################.####.##.#########
##########...#########.#.########.#################.#.###########.#.##########.#.##.################
##############.#####..#######..##################.#######################.########.#########...

output:

16.0312195

result:

ok found '16.0312195', expected '16.0312200', error '0.0000000'

Test #31:

score: 0
Accepted
time: 351ms
memory: 8496kb

input:

92 7
#.#....#..#...#.......#.........................................#.......#...#.............#.
...............#......#............#...#.........................#.....#..............#.....
#..#......#...............#.................#....#............................#.............

output:

15.1327460

result:

ok found '15.1327460', expected '15.1327460', error '0.0000000'

Test #32:

score: 0
Accepted
time: 213ms
memory: 8144kb

input:

92 7
##.###########..######.###############.#.##.#################.##.#############.######.###.##
#############.###############.##..#####################.######.#..#########.###.############
.###.########.###################.########.###################..#######...#########.#####.##

output:

14.0356688

result:

ok found '14.0356688', expected '14.0356690', error '0.0000000'

Test #33:

score: 0
Accepted
time: 315ms
memory: 8096kb

input:

91 8
#..................#..#..............#......................#.......#..........#...#..#....
#....#.#.....#..#......#.....#.................#..#...........................#.........#..
#.......#......#..........#............#.....#...................#..............#.....#....

output:

12.1655251

result:

ok found '12.1655251', expected '12.1655250', error '0.0000000'

Test #34:

score: 0
Accepted
time: 214ms
memory: 8976kb

input:

93 8
############.###########.#######################.############.##.###.######################.#
############.####.###########.#######.####.##########.#######.####.###################.####..
#####.#######.###########.#####.#############.#.##################.##########################

output:

8.0622577

result:

ok found '8.0622577', expected '8.0622580', error '0.0000000'

Test #35:

score: 0
Accepted
time: 422ms
memory: 8688kb

input:

100 109
..#.....#..............#....................#..#.......#.............#................#.#...........
#............##.........#..........#.#....#...............#...#.......#................#...........#
.....#..#......#................................................................#............

output:

1.4142136

result:

ok found '1.4142136', expected '1.4142140', error '0.0000003'

Test #36:

score: 0
Accepted
time: 373ms
memory: 8524kb

input:

97 13
..##...#..........#.........##....##......#............#..........###........#.....#.........#...
##..#....#.............#....#...#.##............#........#.#.#.....................#.......#..#..
........#..#....##.........#.#....#.....#.......#.#...................#......#.......#......##...

output:

8.0622577

result:

ok found '8.0622577', expected '8.0622580', error '0.0000000'

Test #37:

score: 0
Accepted
time: 408ms
memory: 8684kb

input:

100 50
....#......#..................#.......#..#.....#........#.........#......#....#............##.......
#.....##........#.#...........##..#....##....#.#.........##....#.##...........#.....................
......##........#...#....#...#...#............#.......##.#..........##......##....##..#...#...

output:

2.2360680

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #38:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

1 3
#
.
.

output:

-1

result:

ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'

Test #39:

score: 0
Accepted
time: 318ms
memory: 8292kb

input:

92 107
..#........#...#...#.....#....#........#...#.......#.........#..#.........#...##.......##.#.
..##.......#..#....##.#..##.#.##........#............#..#.......#..##..............#....#...
#...#.....#..........#........#.....##.#.................#....##...........#............#...

output:

1.4142136

result:

ok found '1.4142136', expected '1.4142140', error '0.0000003'

Test #40:

score: 0
Accepted
time: 343ms
memory: 8096kb

input:

95 125
...##.......#..#.#.............#..##...#..................#......#...##..#.....##....#.......#.
.........#.....#.#....#....#..##.....#...#...#......#...........##..#........#.#...#.#........#
.#..#....................##.........#...#...........#...........#...#...#..........##.....#.##.

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #41:

score: 0
Accepted
time: 281ms
memory: 8228kb

input:

93 20
#############################################################################################
.#.....#.......###.#..#.###....#...............##...#.....#..#...#...........#.....#....#..#.
....##.....#....#.#......#......#...........#.....#................#......#...#.##........#..

output:

4.1231056

result:

ok found '4.1231056', expected '4.1231060', error '0.0000001'

Test #42:

score: 0
Accepted
time: 269ms
memory: 8404kb

input:

97 21
#################################################################################################
#################################################################################################
......###........#.....#...#.#.........##.#......#.####.##......#....#........#...##....#......#.

output:

4.0000000

result:

ok found '4.0000000', expected '4.0000000', error '0.0000000'

Test #43:

score: 0
Accepted
time: 311ms
memory: 8216kb

input:

93 7
#...#..##..#..#....#...#......#...####.###..##.##.#..#.#.###.##......#..###....#.#..#.#.#...#
.#.#....##..##.##.#...##..##.#..............####.....##.#.#.#.#.#..##....#...#.#.#.......#...
###.###......#.#.#.#...###....#.#.##..#..#...#...#.##.#..##...#.####.#..##.#.###....#.#...#.#

output:

15.1327460

result:

ok found '15.1327460', expected '15.1327460', error '0.0000000'

Test #44:

score: 0
Accepted
time: 266ms
memory: 8408kb

input:

91 15
.##.#..#......#.#####..###....##..#.#...#..##..#.##.....#....#.######.#.#.#......##..##..#.
..#..########....#..#...#.###.#............#.#.#..#..#..#.#.##...##....###.#...#.###..####.
...#.##..####..#.#.#.....#.#..#.#...##.##.#....#....#..#..##.......#####..###.#.#.#.##...#.

output:

6.3245553

result:

ok found '6.3245553', expected '6.3245550', error '0.0000000'

Test #45:

score: 0
Accepted
time: 348ms
memory: 8292kb

input:

98 58
.#..##.....#............###.#####.##.....#.#..#.#.....####..##.##.#.......##...##..#..#....#..#..#
#.#.##.#.#...#.....###...#....##..#..#...#####.##.#.#..#.#.##.#...####.##.#.....###.##.###.#....#.
....#..##..##.##..##...#..#....#.......###...#....#.##..#...#..#.....#....#.#.......####.#.#..#.#.

output:

2.2360680

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #46:

score: 0
Accepted
time: 275ms
memory: 8644kb

input:

92 92
.#.#####.......##.##.....#####.....#..#..##.#..###..###.#..#..#.###..##...##..#.#.##..#.....
#..#...#..........##.##.#.#..#.#..#..##..#...#..###.#.#....#..#.#..#..#.##........#....##.##
.........####..#...#.....###...###.##..#.##.#####...##...##.#....#.##..##.##.######.#.#...#.

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #47:

score: 0
Accepted
time: 270ms
memory: 8012kb

input:

94 40
##############################################################################################
.#.........#.....##.########..#.....##..###..##.#.#..#.####..##...#..#..#....##.#..#....####.#
...#..#.##.#......#......####.....#.#..#.#.#..###.#..#.......##.#.###.#..##......#####.#..#..#

output:

2.0000000

result:

ok found '2.0000000', expected '2.0000000', error '0.0000000'

Test #48:

score: 0
Accepted
time: 250ms
memory: 8400kb

input:

95 21
###############################################################################################
###############################################################################################
..#..#.#....#.#..##.##..#.#.#.##.#.......##.#...#...#.##...#..#..###.#...#......#..##.......#.#

output:

4.0000000

result:

ok found '4.0000000', expected '4.0000000', error '0.0000000'

Test #49:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

1 3
.
.
.

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #50:

score: 0
Accepted
time: 320ms
memory: 8524kb

input:

99 4
#...##.#.####.############.##.###..###.###.##.#.###.#####..#.#..#..#.#..###..##...#.#.#..##########
.##..##.###..##.#.#.#######..##...###..#.##.#.##..#...###...#.###...#####.######..#..########.##.#.
#######.##.####..##.##.#...#.###.###..####..###.######..###.##.#.#..#..#.#.###.#.###.#######.##...

output:

32.0156212

result:

ok found '32.0156212', expected '32.0156210', error '0.0000000'

Test #51:

score: 0
Accepted
time: 349ms
memory: 8736kb

input:

100 12
#.###.####...######.###.########.#.##.#..#......##...#####.#.#..#.#..##.##.#.##.###.##.#########..##
#.###..###.#####.##.#..##..#.###....###...##.##.#..#.#.#.##....#..#.#.#####.#.#########..#.#..#..###
#.#.######.########...#...##.#..#.##.####..#.#.#..#.###...#.#.#..###....#...####.#.##..###....

output:

8.2462113

result:

ok found '8.2462113', expected '8.2462110', error '0.0000000'

Test #52:

score: 0
Accepted
time: 318ms
memory: 8924kb

input:

100 36
..######.#.#####.##.##.#.#######.####.#.######.##.#...####.####....##.#.....##..#########..###.#.###
##.######.#.###.####.##..#..##.##..#.#######.##.######.#...#.##.##.#.#..#..####.###.#..#####.#.####.
##.###.#..#.#####.#....###..#....#.#...#...#.##..###.##.########.##.##.########.#####.####....

output:

2.2360680

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #53:

score: 0
Accepted
time: 295ms
memory: 8484kb

input:

97 74
..####.#..#.###.##...##.#########...#.....##.##.#####.#.###..##..##...###.#.##...####...##.###.##
..##....#.##.###.###..###..#..#..#####.###..#.##..#####.####.###..##.##...#..###.#####.########.#
...##.#.###.#.##.####.#..##.###.######..#.####.####..########..##.#.###..##..###..#..##.#.##..##.

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #54:

score: 0
Accepted
time: 272ms
memory: 8424kb

input:

97 28
#################################################################################################
.###.##.##...########.##.###.#..#.###.#.#..#.##..##.#.##...##..#...##....#...##########.#####.###
.##.#####..##..#.####.##.#.###.###....##.##.########..###.####..####.###.##..#.#..###..####....##

output:

2.2360680

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #55:

score: 0
Accepted
time: 199ms
memory: 8272kb

input:

90 13
##########################################################################################
##########################################################################################
.##.###..####.####.###..###..###..#.##.#.##..###.###.###..#.#.####.#.###.#..#.######.....#

output:

5.0000000

result:

ok found '5.0000000', expected '5.0000000', error '0.0000000'

Test #56:

score: 0
Accepted
time: 226ms
memory: 8452kb

input:

94 4
###.#############..####..#.####.#####.################.####.#######..######.######.###########
.##############.#####.###.####.##..##########.#.##########.#####.##.####.#####.######.########
#.######.#######..###.########.##.##########.##########.####.######.##..##.##.#####.###.######

output:

28.0713377

result:

ok found '28.0713377', expected '28.0713380', error '0.0000000'

Test #57:

score: 0
Accepted
time: 288ms
memory: 8688kb

input:

100 9
###########.######.#.#.#.###.#####..##.###########..#######.#..####..############.#..#..#.##.#######
.####.##..#.####.#####.##.###.###.################.####.###.##..############################.##.####
###.######...####..#####.#..#.##.##.#.##..#######.#######.#####..############.#####.##.#####...

output:

9.2195445

result:

ok found '9.2195445', expected '9.2195440', error '0.0000001'

Test #58:

score: 0
Accepted
time: 236ms
memory: 8212kb

input:

93 27
##..###.#.#.#####.#############.###.###############.##.##.###########.#.#######..####.#..####
####.#.#####.#.###..####.##.##.#..####.#..##########..######.#########.######.##########..##.
#####...#####################...####.##.#.#####.######.#.###.##.#..########.#.###.#.####..#.#

output:

2.2360680

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #59:

score: 0
Accepted
time: 232ms
memory: 8148kb

input:

93 34
#######.#######.##.#.#.#####.##.#################.########...#######.#.#.#..#.##########.####
###...########.##########.##.########.#..##.####.##.#####..######..###.#####..#.###.####.####
#######.#########.#..#####.##.####.##.###.##.###.##.#.#...###.#.######.#####.###.##########.#

output:

2.2360680

result:

ok found '2.2360680', expected '2.2360680', error '0.0000000'

Test #60:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

3 3
.##
.##
.##

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #61:

score: 0
Accepted
time: 226ms
memory: 8684kb

input:

94 14
##############################################################################################
##.#####.####.###.########.########.##.##.#######.##.#..#.#####.#.#.###########.#####.##.###.#
#.#.############.############.###.######..##.#######.##.###.####..#.#####.#####.######..#.#.##

output:

5.0990195

result:

ok found '5.0990195', expected '5.0990200', error '0.0000001'

Test #62:

score: 0
Accepted
time: 277ms
memory: 8656kb

input:

100 4
####################################################################################################
####################################################################################################
#########..###.####..#.####..#.##.#########.#.####..########.####.#.##.######..#####.#####.....

output:

25.0000000

result:

ok found '25.0000000', expected '25.0000000', error '0.0000000'

Test #63:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

99 208
.......###.##........###.....#...#.##..#.##.#.....#...#.#........#...##..##..#........#.###.#.#..#.
........#.##.#.#.....#..............###....#.........#.#....#..#........#.#..#.#..........#.#..#..#
#.##...#....#.##.#....##.#..#...#.##.#...##...#.#.#......#.....####.#.#.#.....#..#..#...#.......

output:

-1

result:

ok found '-1.0000000', expected '-1.0000000', error '-0.0000000'

Test #64:

score: 0
Accepted
time: 360ms
memory: 8624kb

input:

100 30
##################################################...##.#........#.###.#..#.......#..#....##########
........................................########..#..........#..#..###......#..........#..##########
################################################..#...##.........##.#..#.##....#..........#...

output:

2.8284271

result:

ok found '2.8284271', expected '2.8284270', error '0.0000000'

Test #65:

score: 0
Accepted
time: 352ms
memory: 8684kb

input:

100 30
.#..######..###..#######.#######...#.###.##.###.#.#..##.#######.#...............##.##.######.###...#
#.....#..#..####..####.##...##.#####..####..##..#..####..#####......#.....#.....########...###.#.###
.#.#.#.###.#...#..##.####..####.#.##..####..####.###..########.....#...#.......####.##.####...

output:

3.0000000

result:

ok found '3.0000000', expected '3.0000000', error '0.0000000'

Test #66:

score: 0
Accepted
time: 425ms
memory: 8588kb

input:

100 281
..............................................................................................######
..............................................................................................######
.............................................................................................

output:

1.0000000

result:

ok found '1.0000000', expected '1.0000000', error '0.0000000'

Test #67:

score: 0
Accepted
time: 428ms
memory: 8368kb

input:

99 149
...................................................................................................
...................................................................................................
................................................................................................

output:

1.4142136

result:

ok found '1.4142136', expected '1.4142140', error '0.0000003'

Test #68:

score: 0
Accepted
time: 439ms
memory: 9072kb

input:

100 150
....................................................................................................
....................................................................................................
.............................................................................................

output:

1.4142136

result:

ok found '1.4142136', expected '1.4142140', error '0.0000003'