QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#944820#10243. Opieka [A]jiangly (Lingyu Jiang)10 ✓446ms45632kbC++204.1kb2025-03-20 17:12:162025-03-20 17:12:18

Judging History

This is the latest submission verdict.

  • [2025-03-20 17:12:18]
  • Judged
  • Verdict: 10
  • Time: 446ms
  • Memory: 45632kb
  • [2025-03-20 17:12:16]
  • Submitted

answer

#include <bits/stdc++.h>

using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;

void solve() {
    int n, L;
    std::cin >> n >> L;
    
    std::vector<std::string> s(n);
    for (int i = 0; i < n; i++) {
        std::cin >> s[i];
    }
    
    std::vector<int> col(L);
    for (int t = 0; t < L; t++) {
        for (int i = 0; i < n; i++) {
            col[t] += s[i][t] == '.';
        }
        if (col[t] == 0) {
            std::cout << -1 << "\n";
            return;
        }
    }
    
    std::vector len(n, std::vector<int>(L + 1)), nxt(n, std::vector<int>(L + 1)), pre(n, std::vector<int>(L + 1));
    auto check = [&](int num, int den) {
        assert(num > 0);
        
        for (int i = 0; i < n; i++) {
            for (int j = L - 1; j >= 0; j--) {
                len[i][j] = (s[i][j] == '.' && col[j] > 1) ? 1 + len[i][j + 1] : 0;
            }
            nxt[i][L] = -1;
            for (int j = L - 1; j >= 0; j--) {
                nxt[i][j] = len[i][j] * den >= num ? j : nxt[i][j + 1];
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = 1; j <= L; j++) {
                pre[i][j] = col[j - 1] == i + 1 ? j : pre[i][j - 1];
            }
        }
        
        bool ok = false;
        std::vector<int> seg;
        auto dfs = [&](auto &&self, int mask) {
            if (ok || mask == (1 << n) - 1) {
                ok = true;
                return;
            }
            
            std::array<std::array<int, 2>, 2> option {L * den, -1, L * den, -1};
            int cnt = __builtin_popcount(mask);
            
            for (int i = 0; i < n; i++) {
                if (mask >> i & 1) {
                    continue;
                }
                
                int pos = seg.empty() ? 0 : seg.back();
                
                int l = pos;
                int c = cnt;
                for (auto r : seg) {
                    r += num;
                    if (r > l) {
                        int p = std::min(r, pre[c][(r + den - 1) / den] * den);
                        pos = std::max(pos, p);
                        l = r;
                    }
                    c--;
                }
                
                if (len[i][pos / den] * den - pos % den < num) {
                    pos = nxt[i][(pos + den - 1) / den];
                    if (pos == -1) {
                        continue;
                    }
                    pos *= den;
                }
                
                std::array<int, 2> v {pos, i};
                if (v < option[0]) {
                    option[1] = option[0];
                    option[0] = v;
                } else if (v < option[1]) {
                    option[1] = v;
                }
            }
            
            for (auto [pos, i] : option) {
                if (i == -1) {
                    continue;
                }
                seg.push_back(pos);
                self(self, mask | 1 << i);
                seg.pop_back();
            }
        };
        dfs(dfs, 0);
        
        return ok;
    };
    
    std::vector<std::array<int, 2>> fracs;
    for (int i = 0; i <= L; i++) {
        for (int j = 1; j <= n; j++) {
            if (std::gcd(i, j) == 1) {
                fracs.push_back({i, j});
            }
        }
    }
    
    std::sort(fracs.begin(), fracs.end(),
        [&](auto a, auto b) {
            return 1LL * a[0] * b[1] < 1LL * a[1] * b[0];
        });
    
    int lo = 0, hi = fracs.size() - 1;
    while (lo < hi) {
        int x = (lo + hi + 1) / 2;
        if (check(fracs[x][0], fracs[x][1])) {
            lo = x;
        } else {
            hi = x - 1;
        }
    }
    auto [num, den] = fracs[lo];
    std::cout << num << "/" << den << "\n";
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    int t = 1;
    // std::cin >> t;
    
    for (int i = 1; i <= t; i++) {
        // std::cerr << "test " << i << "\n";
        solve();
    }
    
    return 0;
}

詳細信息

Subtask #1:

score: 1
Accepted

Test #1:

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

input:

1 1
.

output:

0/1

result:

ok single line: '0/1'

Test #2:

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

input:

5 100
....X..XXX........X.XX.X...............XX..............X....................X.....X.........XXXX.XX.
....X..X..........X.X..........X...................................X.......X..X.........X.....X....X
....X..X.....X....X.X.X................XX................X..X..................................

output:

73/4

result:

ok single line: '73/4'

Test #3:

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

input:

5 100
.....X....X.....X...X.....X.XX...X.....X.X.X..XXX.....XX.X....XXXXX...........XX...X.XXX...XX.....X.
..XX.....X.X.....XX.....XX.....XXXXXX....X.......X....X.........XX....XX.....X....X......X.X..X.....
.X..X..X.....X....X..X.....X..X...XX.....X.X..XXX........X.....XX........X...X.....X.XX....X...

output:

29/5

result:

ok single line: '29/5'

Test #4:

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

input:

5 100
...X......X.......................X..................X.........X...............................X....
...X..................X...............................X.........X.................X.................
...X.............................X...............................................X.............

output:

91/3

result:

ok single line: '91/3'

Test #5:

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

input:

5 100
........X.................X..........................X.......................X......................
......................X....XX.........................X......................X......................
..X.........................XX......................X..X.....................X.................

output:

49/2

result:

ok single line: '49/2'

Test #6:

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

input:

5 100
..XX...X.XX..XX..XXXXXX.X.X..X..X..XX.X.XXX.XXX..XX..X..XXXXXXX.X.X..X..XX..XX..X.X...XX.X.X.X.XX...
..X.X.X..X...X.X..X..X..XXXX.XXXXXXXXXXX....XX..XXXX..X..X.X..XX.XX..XX..X.X.XX..X..X.X.X...XXX...X.
.X...XX..XX..X..X..X.X..XXX..X..XX.XXXX..XX..X.X..XX..X.....X..XX..X.X.X....XX.X.XX.X.X..XX....

output:

3/1

result:

ok single line: '3/1'

Test #7:

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

input:

5 100
..X.XX.....X..X..X..X..X.X..XX..X.XX..X..XX..XX..X.XXX..X..X.X.X.X.XXX..X.X....X.X.X.XX...X.XXXXXX..
.X...XX..X..X..X.X.X..XX..X..X..X..X..X.XX..X.X.X.X.X..XX..X.X..X..X..XX....X.X..X..XXX..X..X..X.XX.
...XX.X.XX..XXX.....XXXX.XX..X.X.X..XX.X.X.X..X..X..X..XX....X..XXXX..X..XX.X.X.....XXX..X.X...

output:

5/2

result:

ok single line: '5/2'

Test #8:

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

input:

5 100
.......X....X......X......X....X......X...X.......X......X.....X.....X.....X.....X.....X....X.......
......X....X............X.....X...X......XX.....X.X......X.....X.....X....X.......X....X.....X......
......X.....X......X......X......X.X............X.X......X.....X....X.......X...X.......X......

output:

7/1

result:

ok single line: '7/1'

Test #9:

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

input:

5 100
.......X....X......XX.....X.....X......X..X......X.....X..X...X......X.....X.....X.....X....X.......
......X.....X......X......X.....X..X......X......XX...................X....X.....X....X.......X.....
......X.....X......XX.....X.....X....X.....X.....X.X......X...X.....X.......X...X.......X......

output:

13/2

result:

ok single line: '13/2'

Test #10:

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

input:

4 20
....................
......X.............
...............X....
...........X........

output:

10/1

result:

ok single line: '10/1'

Test #11:

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

input:

1 1
X

output:

-1

result:

ok single line: '-1'

Test #12:

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

input:

1 100
....................................................................................................

output:

0/1

result:

ok single line: '0/1'

Test #13:

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

input:

5 1
.
.
.
.
.

output:

1/2

result:

ok single line: '1/2'

Test #14:

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

input:

5 100
....................................................................................................
....................................................................................................
...............................................................................................

output:

50/1

result:

ok single line: '50/1'

Test #15:

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

input:

5 100
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #16:

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

input:

4 8
.X.X..X.
.XX..X.X
X...XXXX
.XXX....

output:

3/2

result:

ok single line: '3/2'

Test #17:

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

input:

3 19
X...X..........XX..
...X.X............X
...................

output:

9/1

result:

ok single line: '9/1'

Test #18:

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

input:

2 100
XX......XXXX........X.X..X.....XX..X..XXX.X.XX.X....X.XXX..X.XX...XXX.XX.X.XX.....X.....X.XXXX....X.
.................X.X......XX..X..XX.X....X.X....XX.......X.....X.X...X....X..X........X..X......X...

output:

5/1

result:

ok single line: '5/1'

Test #19:

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

input:

5 99
.XXX....X.X...XX...XX.....X..XXX..XXX.....XX.XXX...X.X..X.XX.X..X.XXXXX.X.X.X.XX.X.XXX...XXX....X..
XX...X.XXX.X.X.XXXX......XXX...XXXXXX.X.XXX..X...XX.X.XX...XXX.XX.X...X.....XXX.XXX.XXX...XXXX.XX.X
XX.X.XXXX..XXX..XXXX..XXX.XX..X....X..XXXX....X.X.....XX..X....X..X..XX..XX........X..XXX.XXX.X...

output:

4/1

result:

ok single line: '4/1'

Test #20:

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

input:

5 100
XXX...XX..X.....XXX.....X.X..X.XX.X....X...XX.XXXXXXXXX.X..XX.X....X..XX.XX.X.XX.X.XXX..X.X.X..XXXX.
.XX..XXXXXX.XXX.XX.X..X..X..XXX..X..XXXXXXXX.X...XX..XX..XXXX.X.X..XXXX...X.X..X.XX..XX...X.X.X..X..
XXX.XXXX.XX.XX.X.X.X.X..X....X.XXX...X..XX.XX...X........XXX.XXXX...X.....X.X.......X..X.XX....

output:

-1

result:

ok single line: '-1'

Test #21:

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

input:

5 100
XX.....XX.X...X.XXX.XX..X....XXX.XXX.X.XXXX.X..XXX.X.XX..XX....XX..XX......XX.XX..X.XXX.XX.XX.XX..X.
XXXXXXXX.X.XXXXXX..XX.XXXXXXX..XX.X.X.X....X.XX..XX.X..XXX.XXXXX.XX.XXXXXXXX.X..XX.XXX.XXXXXXXX.XX.X
XXXXXXXXXX.XXX.X.X.X.XXXXXXXXXXXX...XXX..X.XXXX.X.X.X..XX.XXXXX.XXX.XXXXXXX..XX.XXXX.X.X..X....

output:

0/1

result:

ok single line: '0/1'

Test #22:

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

input:

5 100
XXXXXXXXXXX.XXXXXXX..X..XXXX.X.XXX....X..XXXXXXX.X.X.X..XXXXXXX..X.XXXXXXX.XXXXXX.XXX....X.XXXX.X.X.
XX.XXXXXX..X.XX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XX.XXXXXXXX..X.X.XXXXXX..XXXXXXXXXX.XXXXX
XXX..XX.XXXXX.XXX.XXXXXX.XXXXXXXXXXXXXXXX..XXXXXX.XXXXXX..XXXXXXXXXXX.XXXXXXXX..XXXX.XXXXXX....

output:

0/1

result:

ok single line: '0/1'

Test #23:

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

input:

5 100
X.XXXXXX.XXXXXX.X.X.XXXXXXXXXXX.XXX.XXXXXX..X.XXX.XXXXX..........X.XXXXXX.XX..XXXXX..........XX..X.X
XXXXX.X.XX.XXXXXXXXXXXXXXX.........XXXXX..........XXXXXXXXXXXXXXXXXX.X.X.XX.XXX.X.XXXXXX.XXXXX.XXXX.
XX.X...........X.X.X..........XXXXXXX....XXXXX.XXX......XXXX...XX.XXXX..........XX..X.X.XXXX...

output:

9/1

result:

ok single line: '9/1'

Test #24:

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

input:

5 100
..XX...........X.X.X..........XXXXX..XXX.XX..XXXX.XX.X.XXXX.XXXXXXX..X..........XXXXXXXX.XXXXXXX.X..
XXXXXXXXX.XXXXX.XXXX.X..XXXX.XXX...........XX.XX.........XXXX.X.........XXX..XXXXX.XXXXXX..XXXXXXXXX
XXX.X.XXXXXX.XXXXXXXXXXXXX..XXXXXXXXX.XXXXXXXX..XX..XXX..........XXXX..X.XXXXXXX.XX............

output:

17/2

result:

ok single line: '17/2'

Test #25:

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

input:

5 99
....X...........X........X......X........XX.........X.......X......X..............X.....X..........
....X...........X........X......X........XX.....X...............X.....X........X........X..........
....X...........X...X..............X.....XX.........X.......X.........X........X........X.........

output:

12/1

result:

ok single line: '12/1'

Test #26:

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

input:

5 99
....X...........X...X..............X.....X..........X.......X.........X.......X...........X........
....X...........X....XXXXXXX....X........X......X...............X.....X.......X...........X........
...................X.XXXXXXX.X..............X.......X.......X.........X.....X.....................

output:

23/2

result:

ok single line: '23/2'

Test #27:

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

input:

5 100
.....X..........X............X......X.......X.......X............X....X.........XX........X.........
.....X...............X......X.......X.......X........X....X.................X...XX........X.........
.................X..........X.......X.....X.............X..XXXXXX....X............X.......X....

output:

12/1

result:

ok single line: '12/1'

Test #28:

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

input:

5 100
....................X........X.....X.........X........XXX..X...............X......X...........X..X..
......X...........X..........X....X............X......XXX...XXXXXXX...X............X..........X..X..
......X..........X............X....X.......X.............X..XXXXXXX....X..........X............

output:

23/2

result:

ok single line: '23/2'

Test #29:

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

input:

5 98
....X.......X....XX....X.XX......X..X.......X......XX..X.X................X.....X......XXX..X..XXX
..X...........X..XX......XX.X.......X...X...............X.....X......X.....X....X..X........X..X..
..X...........X..............XXX....XX.X..XXX......XXXXX.XXXX.X......X.......X..................X...

output:

12/1

result:

ok single line: '12/1'

Test #30:

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

input:

5 98
..XXXX.XXX.......X.......XXXX.XXXX.............X.....X....XX.............XX........X..X...........
.........X.......X.....X................X....X.......X.....XXXXXX....X.X..XX.......X.......X......
XX.X..........XX.X.......XXXXX.....X....XX...............X..XXXXX......X....X.XXXX.X.......XX.X.X...

output:

23/2

result:

ok single line: '23/2'

Test #31:

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

input:

5 100
XX.X....X.......X......X..........XXXXXX..........X.XX...XX..X..X.X..X....XXX..X..X.......X...X.....
.XXXX.X.XXX.X.X....X....XX......X.X.......XX..XXXX...........X..X............X...XX.......X.......X.
X.X......X.......X.........X....X..........X..XXXX...X...X.....XX.X......XX.....XXX......X.....

output:

8/1

result:

ok single line: '8/1'

Test #32:

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

input:

5 100
.X.X.XX.X......X.X.XX.XX.............XXX..........XX...XXXXXX.X.X.X.......X.......XXXX.....X...X....
XXXX..X....XXXX..X......XXX.....X...X...X.X.......XXX.X...........X..XX..XX.......XX....X.XX.......X
.X.....XXXXX.....X....X.XXX.X...XXXX...X..XXX....X...........X..X............X....X....X.......

output:

15/2

result:

ok single line: '15/2'

Test #33:

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

input:

5 100
X..XX.X.XX.XX..X.XXXX.XX..X.XX..X.X..X..X.X.X..X.X..XXXXXXX.X..X..X..X..XXX..X.X..X..XX......X..X.X.
X.XX.............XX..X...X....X.X.XXX...X.......X.X....X.X.X...X.....X..X.........XX...XX..XX.......
XXX..X..XX..XX..X.XXXX..XX..X.X.XXX.X.X..XXX..X.X..X.X.X.X.X.X.X.X.X..X.X..X..X.X..X.X....XX...

output:

8/3

result:

ok single line: '8/3'

Test #34:

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

input:

4 100
X..XX..X.X.....XXXX...........X..X.......XXXX.......X......X...XX.X.......X..X.....X.......XXX..X...
......X..XX.....XX.X......X.X............X..X.....XXXXXX.......XXX......X....X....X...X.X...........
......XXXX.XX...X..XX.............X..X.......X......X.X.XXXXX..XX.....X..X...X.X.......X.......

output:

22/3

result:

ok single line: '22/3'

Test #35:

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

input:

5 20
...X............XXX.
X.XXX.XXX.XX.XX..XXX
.X..XX.X.X.X.X.XXX..
.X.XXX.X.X.XX.X.X..X
.X.XX.X.XX.X.XXX..X.

output:

5/4

result:

ok single line: '5/4'

Subtask #2:

score: 1
Accepted

Test #36:

score: 1
Accepted
time: 1ms
memory: 3740kb

input:

6 1000
...XXXX.XXX..XXX......XX.XX..XXX....X...XX.X...XXXX.X.....XX.XX...XX..X.X...X..XXXXX.X...X.X.XX.XX..X........X....XXX.X..XXXXX.XX.X..X....XX..X...XXX..XXX..X.XX..X.X...XXXXX.XXXXXXX.XX..XX.X...X.XXXX.XXX..X...X.X.XX...XXX.XXX.X..X...X..XX.X....XXX.X.X.XXXX...X..XX.....X.X..XX.XX.X.XX..XX...XX...

output:

6/1

result:

ok single line: '6/1'

Test #37:

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

input:

6 1000
.X.................................XX..XXXX.X........X...................................................XX.X..X...X.X.........X.........X........X.................X...............................................................................................X..................XX......X........

output:

78/1

result:

ok single line: '78/1'

Test #38:

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

input:

6 1000
..XXX.........X...XXX.........X........X..........................X..........XX...X...........XX...X.................X...........................................X.......................X.XX...................X.XXXXXX...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................

output:

155/2

result:

ok single line: '155/2'

Test #39:

score: 1
Accepted
time: 1ms
memory: 3748kb

input:

6 997
.....X....XX........XX.........................................XX.X..............XXX.X..X.XX....X...XXX.X.....................................XX.......X.XX..........XX.....................................XX....X.......X.X...X...XXX...X.....XX.XXXX..X........................X.....X.........X......

output:

89/1

result:

ok single line: '89/1'

Test #40:

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

input:

6 997
............X.......................X..X.....X...........X..........................XX..X...X........................XX..X..X.XX..X.....XX............................XX...............................................XX..X.X.....XX......X.....XXX...............X........X................XXX..XX.....

output:

177/2

result:

ok single line: '177/2'

Test #41:

score: 1
Accepted
time: 1ms
memory: 3684kb

input:

6 1000
....................XX...............................................XX.XXX....................XXXXX.....XX.................X.........................X......XXXX...XX....XX....................XX..X..........................................................................X.........X..............

output:

51/1

result:

ok single line: '51/1'

Test #42:

score: 1
Accepted
time: 1ms
memory: 3980kb

input:

6 1000
............X............X..X............XX...X.X.XX....X......XXXXX..XXXX....XXX...XXXX....X...X..........X...............X................X..X...........................................................................X.X................X.X....X..X..........X..................X.................

output:

101/2

result:

ok single line: '101/2'

Test #43:

score: 1
Accepted
time: 1ms
memory: 3696kb

input:

6 1000
............XXXXX..................XXX............X..............XXX.....XX.X...X...........XX........X.X.......XXX.....XXX.XXX.............................X........X..................X........X...X..X.X......XXXX.X......X.....X.........X.XX..X..XX.X....XX...XX...XX..............................

output:

745/6

result:

ok single line: '745/6'

Test #44:

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

input:

6 1000
..X....................XX.........XX........XX.X...X..XX....X...........X.X..XXXX....X...XX.X..............................X....................X.X........XX...X...XXX.........XX...X.........X.....................XX.......................X.........X.....XX...............X.................X.X....

output:

529/2

result:

ok single line: '529/2'

Test #45:

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

input:

6 1000
X.......X..XX.........X.......XXX.....................................X..XX..X.X..XX............X........X.....................X.......XX.....XX..........X.XXXX........X................................................................X....XXX......X................................................

output:

495/2

result:

ok single line: '495/2'

Test #46:

score: 1
Accepted
time: 1ms
memory: 3932kb

input:

6 1000
..........................X...........................................................................................................................................................................................................................X.................................................

output:

875/4

result:

ok single line: '875/4'

Test #47:

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

input:

6 1000
..X.X.XX...XX..X..X..X..XX..X..X.XXX...XX..XX..X..X.X.....X.X..X.....X..X..X..XX..X.XX.....X..X..X..X..XX..X.X..X.X..X..XX..X....X..X..XX..X..X..X.X..X..X..X..X..X..XX.....XX...X.X..X..X.X.X..XX..X..XXX...X..X.XX..X.X.X..X..XX..X..XX.X.X.XX..X.X..X.X..X..X..XX..X.X...X..X.X.X.X..X.X..XX..X..X...

output:

3/1

result:

ok single line: '3/1'

Test #48:

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

input:

6 1000
..XX......X.X..X.X..X.X..X..X..X..X.X..X.X..XXX..X..X..XX.X..X..X..X.X..X..XX..X..X..X.X.X..X.X.....X..X..XX..X..X..X..X..X.X..X..X..X..X..XX..X.XX..X..XX..X.X.X.XXXX..X..X..X..X..XX..X...X..X.X..X.X..X.X..X..X.X..X..X..X.X..X..XX..X..X.X..X..X..XX..XX..XX..X..XX..XX..X.X..X..X..X..X.X..X..XX...

output:

5/2

result:

ok single line: '5/2'

Subtask #3:

score: 1
Accepted

Test #49:

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

input:

7 10000
..XXXX.XXX.X......X..XX.XX......XX.XX.X...X...X..X.XX........XXXX..X..X..X.X.XX.XX..XX..X...XXX.X.X.XXXX..X....X.X.X.X.....X..XX.XXX.X.X...XXXXX.XXX..X.XX...XX...X...X.XX.X...X.XX..X....XXX...X....XX........XXXXX...X..X....XXX...XXXX.X.X.X..XXXX....XX...X.X.XXX....XXXX.XX.X.X.XX..X.XXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #50:

score: 1
Accepted
time: 16ms
memory: 4940kb

input:

8 10000
XXX...X...XX.XX...X.X...XX..X...X.XX.X.X...X.X..X.XXXXX....X.X.X..XXXXXXXX...X..X..X.XXX.X.X...XXXXX..XX...X...X.X...X..X..X.XXX.X..X...XX....XX..X.X.X..XXXXX..X.XX...XX.....X.X.XXX...XXXXXX.XXXXXX.XX...XXX.X......XXX.XXXX........XXX..X.X..X......XXX...X..X...X.X.X...X...XX..XXXX..XX.X.X.X.....

output:

10/1

result:

ok single line: '10/1'

Test #51:

score: 1
Accepted
time: 12ms
memory: 4940kb

input:

8 10000
.........X.X.....XX.XX.........................X....................XXXXX..............................X...........X......X......X....................XX.....X.X.XXX...X.....X..X....................X.......................................X...X...X............X....................X.X.............

output:

649/1

result:

ok single line: '649/1'

Test #52:

score: 1
Accepted
time: 12ms
memory: 4900kb

input:

8 10000
...................XXXX.................X.........................X................XX...X....X..X......X...X.......XX..........X...XXXX..XX............X..XX......X....X.X.X..........X......X........X.....................X...........X...........................X..X..X..........XX..XXXX..........

output:

1297/2

result:

ok single line: '1297/2'

Test #53:

score: 1
Accepted
time: 11ms
memory: 4928kb

input:

8 9997
.....................................................................................................................................................................................................................................................................................X..................

output:

401/1

result:

ok single line: '401/1'

Test #54:

score: 1
Accepted
time: 7ms
memory: 4924kb

input:

8 9997
......................................................................................................................................................................................................X.................................................................................................

output:

400/1

result:

ok single line: '400/1'

Test #55:

score: 1
Accepted
time: 12ms
memory: 4872kb

input:

8 10000
....................X............XX...........................................................XXXX.X.XXXXXXXXX...............X....X......XX........X.....XX..................X........................................X...............X.........................XX........X.......................X....

output:

657/1

result:

ok single line: '657/1'

Test #56:

score: 1
Accepted
time: 12ms
memory: 4936kb

input:

8 10000
...................X.X..XXX....................................XX.X...............XXX...X.......................................X...........................X.XXX.............X..XXX..........X.....................................................................................XXXX........X......

output:

1313/2

result:

ok single line: '1313/2'

Test #57:

score: 1
Accepted
time: 10ms
memory: 4704kb

input:

8 8192
........................................................................................................................................................................................................................................................................................................

output:

6091/5

result:

ok single line: '6091/5'

Test #58:

score: 1
Accepted
time: 12ms
memory: 5008kb

input:

8 10000
....................................X..........X.X.X........X......................................XXX.......................X.XX.X....X.XXX.X.......................................................X.X...............................................................................................

output:

8921/3

result:

ok single line: '8921/3'

Test #59:

score: 1
Accepted
time: 11ms
memory: 4904kb

input:

8 10000
X....XX.X.X.XXXXXXXXX.XX.XX..XXXXXXXXXXXXX..XXXXXX.XX..XXXXX.XXXXXXXXXXXXX.XX.XX..XXXX.XXXX.XXX.X.XXXXXXXXXXXXXXXXXXXXXXXX.X.X.XX.XXX.XXXXXXXXXXX.XX.XXXXXXX...XXXXX.XXXXX..X..XXXXXX.X.XXXXXXXX.XXXXX.XX..XXXX.XX.XXXXXX.X.XXXX.XXXXXXX..XXX.XXXXXXXXXX..XXXX..XXX.XXX.XX.XXXXXXXXXXXXXXXXX.X..XXXX...

output:

9779/4

result:

ok single line: '9779/4'

Test #60:

score: 1
Accepted
time: 13ms
memory: 4836kb

input:

8 10000
..X.X.X.X.X.X..X..XX..X..X..XX..X..X..X..XX..X..XX..X.XX..X..X.X.X..X..XX..X..XX..XX..X.X.X..X..X..XXX..X..X..XX..XX..X.X..X..X..X..X..X..XX..X..XX..X..X.....X..X.X..X.X.X.X.X.X.X.X..X.X.X..X.X.XX..X.X..X.X..X..X..X..X...X.X..X..X..X..X..X..X..XX..X.X..X.X..X.X..X.X..X..X.X..XX..X..X..XX..X....

output:

3/1

result:

ok single line: '3/1'

Test #61:

score: 1
Accepted
time: 13ms
memory: 4936kb

input:

8 10000
..X.X.X.X.XX......X..X..X.X..X.X.....X..XX..X..X..X.X....X..X.X..XX..X..X..X..X..X..X.X..X.X..XX..X.X..XX.X..XX..XX.X..X..X.X..XX..X..X..X..X.X..X..XX.....X..X..X..X..X..X.X..X..X..XXX..X.X..X..X..X..X.X..X.X..X..X.X..X..XX..X..XX..XX..XX.X..X..X..X..X.....X..X..X..XX..X.X....X..X..X..XX..XX...

output:

5/2

result:

ok single line: '5/2'

Test #62:

score: 1
Accepted
time: 11ms
memory: 5004kb

input:

8 10000
XXXXXX..XX.XX.XX.X.XX.X.X.X.X.XXX.XX.X.XXXX.X.XX.XXX.XX...XXX.XXX.XXXXX.X.XX.X.XX.XXXX.X.XX.X.X.XX.XXXXX.XX.X.XX.X.XXX.X.XXXX.X.XX.X.XXX.XXXX.XX.X.X.X...X.XX.X.XXX.X.XX.X.X.XX.X.XX.X.XX.XXXX.XX.X.X...X.XX.X.X.X.X.X.XXX.X..XXXX.X.XXX..XXX.X.X.X.XXX.X.XX.X.XXX.X.X.X.X.X.X.XXX.X.X..XX.XX.XX.XXX...

output:

2/1

result:

ok single line: '2/1'

Test #63:

score: 1
Accepted
time: 14ms
memory: 4928kb

input:

8 10000
XXXX..XXXX.X.XXXX.XXX.X..XXXXX.X.X.XX.X.XX.XX.XX.XX.X.X.XX.XXX.XX.XXX.XX...XXX.XXXXX.X.XX.X.X.XXXX.XXX.XXX.X.X.X.X.XXXXXX...X.XXX.XXX.X.XXX.X.XXXXXX.X.XXXXXXX.XXX.X.XXX.XXXXXXX.XX.X.X.X.X.XX.XX.XXXX.X.XX.XXXX.XXXXXXXXX.X.XXXX.XX.XX.XX.X.X.X.XX.X.XX.XX.XX.XXXX.X.XX.XX.X.X.X.X...XXXX.XX.X..X.X...

output:

3/2

result:

ok single line: '3/2'

Subtask #4:

score: 1
Accepted

Test #64:

score: 1
Accepted
time: 41ms
memory: 9256kb

input:

10 30000
......................................................................................................................................................................................................................................................................................................

output:

15000/1

result:

ok single line: '15000/1'

Test #65:

score: 1
Accepted
time: 59ms
memory: 9268kb

input:

10 30000
...X..X..X.....X...X.....X.X...XXX.XX..XX.X......X.X.X.X..X..X.X.XXXX.XXXXX....XX......X....XXX.XX..X.XXX...X...X.X.X.XXX......XXX.X....X.....XXXXX......XX...XX.XXXX....X.X.X.....XXX.XX.X.X.X....XXX.X.X.XX.XXX....X.X.X....X.XX..XXX.XX...X.X...X.XXX.X.XX..XX.X..XX.X..XX..XX....X.X...XX.XXX.....

output:

13/1

result:

ok single line: '13/1'

Test #66:

score: 1
Accepted
time: 45ms
memory: 9432kb

input:

10 30000
................................................................X...............X............................................................................................XXX...............X...........X......X.XXX..................................X...X...XX.XXXX..X....X......................

output:

1594/1

result:

ok single line: '1594/1'

Test #67:

score: 1
Accepted
time: 46ms
memory: 9284kb

input:

10 30000
..X...X...........................X.XX.............................X.X....XX...XXXX...XX.X.....X.X...........XX..X...............X..XX..................X...................X..XX.......................................X..............XXX...................X..XX...XX.X.................XXXX........

output:

1543/1

result:

ok single line: '1543/1'

Test #68:

score: 1
Accepted
time: 47ms
memory: 9236kb

input:

10 29999
X.XXX...................................................X......XX........................X...................X.X.X.X..XXX.XX..X........................................................XXX........................X.........X..X.X..XXXXXX....................X.......................................

output:

1504/1

result:

ok single line: '1504/1'

Test #69:

score: 1
Accepted
time: 46ms
memory: 9420kb

input:

10 29999
......................................................................................XXXXX...................................X.........X...X...X...................................XXX......XXXX....XXX....X....X..............X...X.XX........X.X.X..X.......X..X............X...X..................

output:

3007/2

result:

ok single line: '3007/2'

Test #70:

score: 1
Accepted
time: 49ms
memory: 9296kb

input:

10 30000
XX.X.X..................................................XXXX.XXX......................................................................................XXX......XX..............XX....XX..XXX.XXXX....XX.XXXXX.X..X...XXXX.....................XX...X..XX..X......XXX...X.XXX....X....X..XX....XX.X....

output:

1731/10

result:

ok single line: '1731/10'

Test #71:

score: 1
Accepted
time: 50ms
memory: 9280kb

input:

10 30000
................X...X...X.....X................X......X.........XX.XXX.........................................................................XXXX............X...X...X..............XX..................X....X........................................................XX..............XX.XXX........

output:

1969/4

result:

ok single line: '1969/4'

Test #72:

score: 1
Accepted
time: 48ms
memory: 9296kb

input:

10 30000
.................X.X......X............X.X..X.............................................................................................XX..........................................XXX.XX......X..............................X..XX.................X..............................................

output:

23617/5

result:

ok single line: '23617/5'

Test #73:

score: 1
Accepted
time: 44ms
memory: 9288kb

input:

10 30000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXX.XXX.XXX.XXXXXXXXXX.XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXX.X.XXXXXX.XX.XXXXXXX.XX.XXXXXX..XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XX.XXXX.XX.XXXX.XXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXXXXX.X.XXXXXXXXXXXXXXXXX.X.X.XXX.XXX.XXX.XXXXXXXXX...

output:

8613/2

result:

ok single line: '8613/2'

Test #74:

score: 1
Accepted
time: 39ms
memory: 8996kb

input:

9 30000
XXXXXXXXXXXXXXXXXXXX..X.XXXXXXX.XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXX.XXXX.XXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXX.XXX.XXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.X.XXXXXXXX..XXXXXXXXX.XXXXXXXXXXXXXXXXX.XX.XXXXX.XXXX.XXXXXXXXXXXXXX.XX.XXXXXXX.XXX.XXXXXXXXXXX.XX.XX...

output:

22568/3

result:

ok single line: '22568/3'

Test #75:

score: 1
Accepted
time: 42ms
memory: 9180kb

input:

9 30000
..X.X.X.X.X.X..X..XX..X..XX..XX..XX..XXX..X.X.X..X..X.X..XX..X..X...X..X.X.....X..X..X.X..X..X.X..X..XX..X..X..XX.X..XX..X..X..X..X.....X.X..XX..XX..XX..XX..XXX..XX..XX..X.XX..X..X..X..X.X.X..X..XXXXX..X.X..X..X..XXX.X..XX..XX..X.X..X.X..X..X..X..XX..X..X.X..X..X..X..X..X..X..X.X..X..XX..XX....

output:

3/1

result:

ok single line: '3/1'

Test #76:

score: 1
Accepted
time: 47ms
memory: 8996kb

input:

9 30000
..XX...X.X..X..X.X..X.X..X.X..X..X...X..X..X..X.X.....X.X.....X..XX..X..X.....X.X.XX..X..X..X..XXX..X.X..XX..X..X..XX..X.X..X..X.X..X..XX..X..XX.X.X..X.X.X..X..X..X.XX..X..XX..XX.X..X..XXX..X..X..X..X.X.X..X..X.X..X..X.X..X.X.X..X..XX..X.X..X..X..X..XX....X..X.X..X.X..X.X..X..X..X..X..X.X.X....

output:

5/2

result:

ok single line: '5/2'

Test #77:

score: 1
Accepted
time: 45ms
memory: 9296kb

input:

10 30000
..XX...XX.X.X.X.X.X.X.X..X.XXX.X..X..X..XX..X.X.X..XX..X.X..XX..X.X..X..XX.X.....X..X..X.XX..X..X.X.X..XX..X..X..X.X..X..X..XX..X..XXX..X..XX.XX..XXX.X..X..X..X..X..X.X..X..X..X..X..XX..X.X.X.....X.X.X.XX..X..X.X..XX..X..X..X.XXX..X.X.X..X.X..XX.X..X.X..X..X.X..X.X..X.X.X..X..X..XX..X.X..X....

output:

3/1

result:

ok single line: '3/1'

Test #78:

score: 1
Accepted
time: 51ms
memory: 9448kb

input:

10 30000
..X.X.X.X.X..X..XX...XX..X..X.X...X..XX..XX..X.X.....X..X..X..X..XX.X..X..XX..X.X..X..XX..X..X..X..XX..X..X..X.XX..X..X..X..X.X..XX..X..X..X.X..X..XX..X..X..X.X..X.X.X.X..X..X..X.X..X.X.X......X..X..XX..X..X..X..X..X..XX..X..X.....X..XX.X..X.X..X.X..X.X.X..XX..X.XX..X.XX...X..XX..X.X..X..X....

output:

5/2

result:

ok single line: '5/2'

Subtask #5:

score: 1
Accepted

Test #79:

score: 1
Accepted
time: 96ms
memory: 15644kb

input:

12 50000
.XXXXXXXXXXXX.XXXXXXX.XX.X.XX....XX....XXXXX.XXXX.XX.XXXXXXXXXXXXX..XXXXX.X.XXX.XX..XXXXXX..XXX.XXXXX.XXXXXX.X.X..XXXXXXXXXXX.XX.XX.X.X.XX.XXXXXXXXXX.XXXXXXXXXX..XXX.XX.XXXXX.XXXXXX.XX.XXXX.XXXXX.XXXX.XXXX.XXXXXX.X.XX.XXX.XX.XXXX..X.X.XXXXXXXXXXXX...XXXXX.XX.XX...X.X..XXX.X...XXX..XXXXXXX.....

output:

0/1

result:

ok single line: '0/1'

Test #80:

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

input:

12 11
....XXX.XXX
XXX..XXX.XX
X....X.X...
..XX.X....X
X..X.X.X.XX
.X....X.XX.
X......X.X.
....XXXXX..
XXX....X.XX
X.X.XX..XX.
..XX..XX.X.
XXXX.X.....

output:

2/1

result:

ok single line: '2/1'

Test #81:

score: 1
Accepted
time: 105ms
memory: 15648kb

input:

12 50000
..............................X...................X.X.X........XX.X..........X.XXX...........................XX.XX...........X.....X........X...........X....XX....X.......X.................X...................................................................................XXXX....XXX..........

output:

2168/1

result:

ok single line: '2168/1'

Test #82:

score: 1
Accepted
time: 90ms
memory: 16584kb

input:

12 50000
......X.............XX.....XXX....X....X...........................X....................X.....................................................................................XXX.........X.XX.....................X..................................................................................

output:

2150/1

result:

ok single line: '2150/1'

Test #83:

score: 1
Accepted
time: 101ms
memory: 16268kb

input:

12 50000
.........X.XX......X.....X....X.............X...XX..............................X..........................................................X...........X................................................X.X.X.X.X...XX.....XXXX........................................XXX.X.XX.......................

output:

1735/1

result:

ok single line: '1735/1'

Test #84:

score: 1
Accepted
time: 97ms
memory: 17012kb

input:

12 50000
.....................................XX..........X.........X.................................................X...............................................................XXXXX......X...XX.................................................XXX....................................................

output:

3469/2

result:

ok single line: '3469/2'

Test #85:

score: 1
Accepted
time: 98ms
memory: 16828kb

input:

12 50000
....................X.................X.....X..........XXXXXXXXXX................XX...........................................................X.X...........X.............XXXXXX.....................................................X..XX..............X.............................................

output:

18240/7

result:

ok single line: '18240/7'

Test #86:

score: 1
Accepted
time: 98ms
memory: 15848kb

input:

12 50000
...XX.......................X.XX.XXX.XXXX............XX.X.....X..XXX..XX.X.XX...........................X...................................................X...................................X.................................X..X.X...X....X.....................................................

output:

34069/5

result:

ok single line: '34069/5'

Test #87:

score: 1
Accepted
time: 96ms
memory: 16896kb

input:

12 50000
X..........................................X.......X...XX................................XX.......X........................XXX......................X..X..............X....X.....................X...........................................................................................X........

output:

27886/5

result:

ok single line: '27886/5'

Test #88:

score: 1
Accepted
time: 90ms
memory: 16340kb

input:

12 50000
XXXXX.XXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XX..XXXX.XXXX..XXXXXXXXXXXXX.XX.XX.XXXXX.XXXXXXXXX.XXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXX.XXXXXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX.X.XXXX.XXXXXXXXXXXX.XXXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.XX.XXXX.XXX.X...

output:

39540/7

result:

ok single line: '39540/7'

Test #89:

score: 1
Accepted
time: 103ms
memory: 15976kb

input:

12 50000
..XXX..XX.........X.X......................................X.......................X................................................................X.......X.X..X...................................X..XXXX.X......X.........................................................XXXX....................

output:

38527/5

result:

ok single line: '38527/5'

Test #90:

score: 1
Accepted
time: 110ms
memory: 15976kb

input:

12 50000
...X.....X..XXXX.....X..X....X.XX....X..X....X...X.....X..XX..X...X.X.X....XX.XX....XX....X....X...X....X..XXXX....X...X.X....XX....XX....X..X....XX...X..X....XX..XXXX...X....XX...X....X....XX...X....XXXXXXXX....XXXXX.XXXXXXXX..XX...X.........XXX.XXX.........X....X.X....X....X....X..X....X....

output:

5/1

result:

ok single line: '5/1'

Test #91:

score: 1
Accepted
time: 106ms
memory: 17540kb

input:

12 50000
.XXXXX.XX..X.XXX....XX..XXX.XXX.X....XX....XXX....X..X.X...X.X...X.X....XXXX.........X....XX..X....XX.X....XX....X..XX....XX...X....XX....X....X.X...X....XXX.XX....X....X....X.X..X....X..XX...XXXXXX...XXXXXX....XXX..X...X.X....X.X....X..X.X.XXX..X....XX.......X....XXX....XXXXXXX....X.X........

output:

9/2

result:

ok single line: '9/2'

Test #92:

score: 1
Accepted
time: 115ms
memory: 15580kb

input:

12 50000
..X.X.XXXX..XXXXX..XXXX..X.X.X.X.XXX.XX.X.X..X..XX..X.X..XXX..XXXX..X..X..XX.X.XX.X..X.X.X..XX..X..XXX.X..XXXX..X.XX..XXXXXXX..X..X.X..XX..X..X..X..X..X..XX..X..X..XXXX.....XXX..XX..X.X..X.XXX..X.X..XX.XXXXX..X..XX.XX..XX..XXXX.XX..XX..XX.XXX..X.XXX.XXXXXXX.X.X..X.X..X.XX..X..XXXXX..XXXX.XX...

output:

3/1

result:

ok single line: '3/1'

Test #93:

score: 1
Accepted
time: 103ms
memory: 16608kb

input:

12 50000
.XX.XX....XX..X..X..XX.X.X.X..X.X.X..XXX.X..X..XXX..XX.X..X..X..XX.XX..X.X..X..X.X.XX.....XXXXXX.X..XXX..X..XX..X.XXXXXX.X.X..XXX..X.X..XX.....X.X..X.X.X....X..X..X..XXXX..XXX..XXXX.X.X.X..XX..X..X..XXX.X..X..XX.X..X..X....X..XX..XX..XXX..XX.X..X..XXX.X..XXX.XX..X..X..X..XXXXX.X..X..X..X.X....

output:

5/2

result:

ok single line: '5/2'

Test #94:

score: 1
Accepted
time: 102ms
memory: 16504kb

input:

12 50000
..X.X.X.X.XX...XX.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X..X.X..XX.X..XX..X.X..X..XX..X..X.X..XX..X..X..X.X..X..X..XX..XX.X..X..X..X..X..XX..X..X..X..X..X..X..X..XX..X..X.....X..X..XX..XXX..XX..X.X.X.X..X.X..X.X..X..X.X.X.X..X.X.X..X..X.X..X..XX..X.....XX..XX..X..XX..X..XX.XX..XX..X.X..X..X.X..XX.....

output:

3/1

result:

ok single line: '3/1'

Test #95:

score: 1
Accepted
time: 98ms
memory: 16884kb

input:

12 50000
..X.X.X.X.X.X..X..X.X.X.X.X.X.X.XX...XX.X.X.X.X.X..X..X.X..X..X..X.X.X..X.X..X..X..X..X..X..X.X..X..X..X.X..X..XX..X.X..X..X..X..X..X.X....XX.X..X..X.XX..X..X..X..X..X..XX..X..X.X..X..X.X..XX.....X.X..X..XXX..X.XX..X.X..XX.X.XX.....X..X..XX..X..X..X.X..XXXX..X..XX..X.X..X..X..X..X......X..X...

output:

5/2

result:

ok single line: '5/2'

Subtask #6:

score: 1
Accepted

Test #96:

score: 1
Accepted
time: 1ms
memory: 4320kb

input:

14 60000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #97:

score: 1
Accepted
time: 132ms
memory: 24624kb

input:

14 59999
......................................................................................................................................................................................................................................................................................................

output:

59999/2

result:

ok single line: '59999/2'

Test #98:

score: 1
Accepted
time: 173ms
memory: 23868kb

input:

14 60000
...X.X.X..X.X....X.XX..X..X...X.....X.XXXX.....XXX...X.X.XX.X.XX...X..XXX.X..X..X.XX..XX......XX.XXX.XX..X.XXX.XXXXX..XX..X.X.XX.XX...XXXX.XX..X.XX...X.X.X...X.XX..XX...X.X.X.XXXXXX..X.X.X.....X...XX.XX.....XX.........X..XX.XXXXXXX..XX.XX..XX.........X..XX....X.XX..XXX...XXXX.X..XX.X...X.X....

output:

13/1

result:

ok single line: '13/1'

Test #99:

score: 1
Accepted
time: 149ms
memory: 22752kb

input:

14 60000
XXXX.............X..............................X.......XXXX............................................X....................................................XXX............................X.X......XX........................................X............X.....X..XXX..............................

output:

2399/1

result:

ok single line: '2399/1'

Test #100:

score: 1
Accepted
time: 139ms
memory: 23956kb

input:

14 60000
...................X........................X.........X..........X...........X............................XX........X...XX................................X.....................X..XX..............X.XX...XXX....XXX....X......X.X...................................................X...........X....

output:

2396/1

result:

ok single line: '2396/1'

Test #101:

score: 1
Accepted
time: 133ms
memory: 18752kb

input:

13 60000
XX.XXXXX...X..........................................................................X................XXX.....................X......X.X.........X................................X...........XXX....X.....X.XX......X..XX........X...XX.............................................................

output:

1060/1

result:

ok single line: '1060/1'

Test #102:

score: 1
Accepted
time: 135ms
memory: 18200kb

input:

13 60000
....................................................X................................................X.XXXX.........X..X...XXX.XX.XXXX...XXX..........................................X....................................X..X.......X.X.............................................................

output:

2119/2

result:

ok single line: '2119/2'

Test #103:

score: 1
Accepted
time: 156ms
memory: 23716kb

input:

14 60000
........................................................X...........X..............X..........................X......X.............................................X...................................................X.X....X...........................................................X....XX.....

output:

49429/14

result:

ok single line: '49429/14'

Test #104:

score: 1
Accepted
time: 150ms
memory: 23124kb

input:

14 60000
.......................................................................X.X..........................................................................................................................................XXXXX..X....X.XX..................................X......................X........

output:

18231/13

result:

ok single line: '18231/13'

Test #105:

score: 1
Accepted
time: 138ms
memory: 23220kb

input:

14 60000
......................................................................................................................X...............................................................................................................................................................................

output:

14057/3

result:

ok single line: '14057/3'

Test #106:

score: 1
Accepted
time: 125ms
memory: 23892kb

input:

14 60000
.X.XXXXX.XXXXXXX.XXX.XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.X.XXX.XXXXXXXXXXXXXX.X..X.XXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXX.XXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXXXXX.XXX.XXXXXXXXXXXXXXX.XXXX.XXXXXXXXXX.XX...

output:

50731/7

result:

ok single line: '50731/7'

Test #107:

score: 1
Accepted
time: 148ms
memory: 23392kb

input:

14 60000
X..XX..X...........X................................................................................X..............X........................................................................XX.XXX.........................................................X..........XX....................X..XXXX...

output:

59261/8

result:

ok single line: '59261/8'

Test #108:

score: 1
Accepted
time: 139ms
memory: 23800kb

input:

14 60000
...................X..................X..................X..................X..................X..................X...................X.X...................X.......X...................X...................X.................X...X..X...................X.................X........X.............X...

output:

20/1

result:

ok single line: '20/1'

Test #109:

score: 1
Accepted
time: 131ms
memory: 24356kb

input:

14 60000
....................X.................X..................X..................X..................X..................X...................X.........X................X.................X...................X..................X................X...................X........X...................X.........

output:

39/2

result:

ok single line: '39/2'

Test #110:

score: 1
Accepted
time: 156ms
memory: 23504kb

input:

14 60000
.XXXX.X.X.X.XX...XX.X.X.X.X.X.X..X.XX..X.X..X.XXX..X..XX..XX..X..XXXXX..X.X..X..XX..X..X.XX..XXXXXXX.X.XXX.X..XX..XX.X.XXXX.X..XXX.XX..XX..XXX..XXX..X.XX.XX..X..XX..X..X.XX..X.X..XX..XXXXXX..XX.X.XXXXXX..X..X..XX...XX.X..X.X..X.XXXX.XX.X..X..XXX..X..X..XX..XX..XXXX..X.X..X.X..X..X.X..X..X.....

output:

3/1

result:

ok single line: '3/1'

Test #111:

score: 1
Accepted
time: 161ms
memory: 22728kb

input:

14 60000
..X.XXX.X.X.X.X.XX...X...XXXX.X..X..X..X..X..XXXXXX..X.X..X.X..X..X..XX..XXX..XXX..XXXX..XXXXX.X.XX..XX.XX.XXXX..X..XX..X..XXX..XXXXX..XXXX.XX.X.X.X..X.XX..XXX.XX..XX..X..XX.XX..X..X..X.XXX..X..X.X.X..XX.X..XX..X..XX..X..X..X..XXXXX.....XX..X..X..XXXX.XX..XX..X..X..X.X..XXX..X..X..XXX..X..X...

output:

5/2

result:

ok single line: '5/2'

Test #112:

score: 1
Accepted
time: 145ms
memory: 24312kb

input:

14 60000
..X.X.X.X..XX..XX..X.X.X..XX..X..XX..XX..X.XX..X..X..X..X.X..XX.....X..X..X..XX..X..X..X..X..XX..X..X..XX..X..X.X.X..X..X..X.X..X.X..X.X..XX..X..X..XX...XX..X..X.X.X..X.X.X..X..X..XX..XX.X..X..X..X..X..X..X..X..X..XX.X..X..XX..XX..XX..XX..XXX..X.X..X..X..X..X..X..X..XX..X.X..X..XX..XXX..X.....

output:

3/1

result:

ok single line: '3/1'

Test #113:

score: 1
Accepted
time: 147ms
memory: 23104kb

input:

14 60000
..X.X.X.X..X.....X.X..X..X..X..X..X..X..X..XX..X..X..X..X..X..X.X..XX..X..X..X.X..XX..X..X.X.X..XX..X..X..X.X..XX..X.X..X.X..X..X.XX..X.X..X.X..X..X..X..X..X.X..X.X..XX..XXX..X..XX.X..X.X..XX..X..X.X..X..XX..X..XX.X..XX..XX..X..X..X..X..X.X.XX.X..X..X..X..XX..X.X..XX..X..X..X.X..X..X..X.X.....

output:

5/2

result:

ok single line: '5/2'

Test #114:

score: 1
Accepted
time: 162ms
memory: 23132kb

input:

14 60000
..XXX.XXXXXXXXXXX.X.XXX.X.X.X.X.X.XX...XX.XX...XXXX.X.X.X.X.XXX.X..XXXX.X..XXXXX..XX..XXXX..XX..X.X..X..XX..XXX..XXX..XX..XX.XX..XX.X..X.X.X..X..XXXXX.X.X..XXX..XXX.X.X..X..XX..XXXX.X..X.X..XX..XX...X.X.XX.X..XX..X..XXX..X..X.XX..X..XXXXX.XX..X..X..XX..X..XX.XX.....X..X..XXX.XXXX..X..X..X.X...

output:

3/1

result:

ok single line: '3/1'

Test #115:

score: 1
Accepted
time: 156ms
memory: 24212kb

input:

14 60000
X..X.XX.X.XXXXXXX.XXXXX.X.X.X.X.XXXXX.X.XX...XXXX.X.X.X.X.X.X.X..X.XXXXXXX..X..XX..X.XXX..XX.X.XXX..X..XX.X..X....X..XX..X.XXXXXX..X.X..X..X..XX.XX..X..XXXX.X.X.XXXX..X..X..XX..X..XXXXX..XXX..X.XXX..X..XXX..XX..X...X..X.XXXX..X..XXXXX..X..X..XX..X..X..X.X.X..X.X..X.X..X..XX..X.X....XX..X.X....

output:

5/2

result:

ok single line: '5/2'

Subtask #7:

score: 1
Accepted

Test #116:

score: 1
Accepted
time: 156ms
memory: 26212kb

input:

15 70000
XXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.XX.XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXX.XXXXXXXXXXXXXXXXXX.X.XXXXXXXXXXX.X.XXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXX.XXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXXX.XXXXX...

output:

0/1

result:

ok single line: '0/1'

Test #117:

score: 1
Accepted
time: 235ms
memory: 26052kb

input:

15 70000
.X.X..X....XXX..X.XX..XX.X....X.XX.XXX.X.X....XXX...XX.X..X.XXXX...XX..X.X..X...XX.XX.X..XXX....XX...XX.......XX.....X...XX...X.XX.X...X...XXXX.X....X.X....XXX.X...XXX..X.X..XX.X.XX.X..X.XXXX...XXXXX.XX.XX..X..XXX.X......XX...X.X.XXXX.XX..XX.XX..XX..XXX.X.XX....XXXX.X.X..XX..X.XX..X.X.XXXXX...

output:

13/1

result:

ok single line: '13/1'

Test #118:

score: 1
Accepted
time: 187ms
memory: 27492kb

input:

15 69999
...................X..X.X.......................X...X.XXXX.................................................................................................................................................X.................................................................X........................

output:

2293/1

result:

ok single line: '2293/1'

Test #119:

score: 1
Accepted
time: 199ms
memory: 26096kb

input:

15 69999
.X....X.......................X.X.............................................................................................X.X.XXX.X............................................................................................X......X............................X.X..................X.........

output:

4585/2

result:

ok single line: '4585/2'

Test #120:

score: 1
Accepted
time: 171ms
memory: 27296kb

input:

15 69998
.X....................X...................................................X.......................................XX..X...............X............X............................................X...........X.................XX.XX.......................................................XX..........

output:

2666/1

result:

ok single line: '2666/1'

Test #121:

score: 1
Accepted
time: 180ms
memory: 25836kb

input:

15 69998
.................................................XX.X.................X......X......X.....X..XXX..........X......................................................................................XXX..X.X.............................................................................................

output:

5331/2

result:

ok single line: '5331/2'

Test #122:

score: 1
Accepted
time: 203ms
memory: 26044kb

input:

15 69997
...................XXXXX...X.........XXXXX.................................X..............................................................XX............X..XXX.....................X........................................................X.....X......X..X......XXXX..X...............X............

output:

58399/5

result:

ok single line: '58399/5'

Test #123:

score: 1
Accepted
time: 185ms
memory: 27284kb

input:

15 69996
............XX....X..X.............XX..XXX............X..X.X.X............................................X.......X.X....................................................................X........XXXXX...XXXX..XX....................X..............X......X.........................................

output:

5423/4

result:

ok single line: '5423/4'

Test #124:

score: 1
Accepted
time: 158ms
memory: 27536kb

input:

15 70000
XXXXXXXXXXXXXXXXX.XXXX.XXXXXXXX.XXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXX.XXXXXXXXXX.X.XXXXX.XX.XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXXXX.XXX.X.XXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXX...

output:

65681/12

result:

ok single line: '65681/12'

Test #125:

score: 1
Accepted
time: 156ms
memory: 26668kb

input:

15 70000
......................................................................................................................................................................................................................................................................................................

output:

57874/3

result:

ok single line: '57874/3'

Test #126:

score: 1
Accepted
time: 161ms
memory: 25644kb

input:

15 70000
......................................................................................................................................................................................................................................................................................................

output:

25358/5

result:

ok single line: '25358/5'

Test #127:

score: 1
Accepted
time: 175ms
memory: 25972kb

input:

15 70000
...XX.X.X.X.X.X.X.X.X.X..XX..XX..X..X..X..X.X..X..X.X..X..X..XX..XX..XX.X..X..X..XX..X..X.X..X..X..X..X..X..X..X...X..X..X..X..XX..X..X..XX..XX..XXX..X.X..X..XXX..X.XX..X..X..XX..XX..X.X..XX..X..X..X..X.X..XX.X..XX..X.X..X..X.XX..XX..XX..XX..XX..X.X..X.X.X.X..X..X..XX..XX..X.X..X..XX..X.X.X...

output:

3/1

result:

ok single line: '3/1'

Test #128:

score: 1
Accepted
time: 183ms
memory: 25752kb

input:

15 70000
..X.X.X.X.X.X.X.X.X.X.X..XXX.X..X..XX..XX.X.XX..X.....XXXX..X.X..X..X..X..XX..X.X..XX..X..X..X..X..X.X..X.X..X.....X.X..XX..XXXX..X..X..X.X.XX..X.X..X..XX..X..XX..XX..XX..X.X..X.X.X..X..XX..X..XX..XX..X..XX..X..X..X.X..X..X..X..X..X.X..X..X..X..X.X.X..X..X..X..XX..X..X..X.X.X.X..XX.X.XX..X....

output:

5/2

result:

ok single line: '5/2'

Test #129:

score: 1
Accepted
time: 168ms
memory: 26292kb

input:

15 69943
....................................................................................................X.................................................................................................X...............................................................................................

output:

100/1

result:

ok single line: '100/1'

Test #130:

score: 1
Accepted
time: 169ms
memory: 26288kb

input:

15 69943
...................................................................................................X..................................................................................................X...............................................................................................

output:

199/2

result:

ok single line: '199/2'

Test #131:

score: 1
Accepted
time: 202ms
memory: 27264kb

input:

15 70000
.XXX...XXX.XX..XXX..XXXXX..XXX..X..XX..X..X.XX..XX..XX..X..X..X..X..XXX..XX.X.X..X.X..X..XXX..XXXXXXX.X..XX..XX..XXXXX..X..XX..X..XX....XX..XX..XXX..XX..X.X.XX.X.X..XXX..X..X..X.XX..X..XXXX..X..XX.X..X..X.XX.X.XXXXX..XX..X.X..XX..XXX..X..X.X..X.XX.....X..XX..X.X..XX..XX..XXXX.XX..X..XXXX......

output:

3/1

result:

ok single line: '3/1'

Test #132:

score: 1
Accepted
time: 203ms
memory: 27128kb

input:

15 70000
..X.X.XXX..XXX.X.X..X..X.....X.X..X..XX..X..X..X..XX..X..X..XXXX..X.X.X.....X.X..XX..X.XX..X.X..XXXXX..XXXX..XXX..XX.....X..XXXXX...X.XX..X..X..XX..X.XX..XX.XXX..XX.X..X..XXXXX..X.X..X..X.X.X..X..XXX..X..XXX..XXXXXXX..XX.X..X..XX.XX.X..X.....X..XXX.X..X..XX..XX.X.XX.XX.X.X.X.X..XXX..X.XXX.....

output:

5/2

result:

ok single line: '5/2'

Test #133:

score: 1
Accepted
time: 178ms
memory: 26152kb

input:

15 70000
..X.X.X.X.XX...X...XX.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X.X.X..X..X..XX..X.X..X.X..X.X..X.X.X.X..X..X..XX..XX..X..X.....X..XX..XX.XXX.XX.X..X..X..X..X..XXX..XX..XX..XXX..X.X..X..X..X..X..X.X..X.XX..X..XX..X..X..X.X..X..X..X.X.X..X..XX..XX.X.X..X..XX..XX..X.X..XX..X..X.X..X..X.X..X.X..X..X..X....

output:

3/1

result:

ok single line: '3/1'

Test #134:

score: 1
Accepted
time: 178ms
memory: 27264kb

input:

15 70000
..X.X..X..XX...X...XX.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X.X.X..X..X..X..X..X..X..X.XX..X..XX.X..X..XX.X..XX..XX..X..X.X..X..X..X.X..X..X..X..X..XX..XX....XX..X..X.X..XX..X.X..X..X..X..X..XX..X.X..X.X..X..X.X..X..X..X..X..X.X..X..X..X..X..XX..X..X.X..X..X..XX..X.X.X.X.X.X..X..XX..X.XX..X..X..X...

output:

5/2

result:

ok single line: '5/2'

Subtask #8:

score: 1
Accepted

Test #135:

score: 1
Accepted
time: 2ms
memory: 4856kb

input:

16 80000
XX..XX..X.XXX.XX.XXX.XX...X..X..X....XX.....X........XXX.XXXX.X....X.XXXXX...X.....XX.X..XXX.X..X.XXX....XXXX...XX..X..X...X.XX..XXXX.XX.X....XX.X.XXX....XXX...X.XXXX..XXXXX..XX.XX..X.XXXXX.X..XXXX.XXXXX.X.XXX.X...XX.XXXXX..X..X....XX.....XX.X.XX..X.XXX.X..X..X....X.X..X..XX...X...XXX.X...X...

output:

-1

result:

ok single line: '-1'

Test #136:

score: 1
Accepted
time: 284ms
memory: 28760kb

input:

16 80000
XX..X..X..XX.XX..X.X.XXXX.X.....XX...XXXX..X.XXXXX.X....X.XXX...XX..X.X.X.XXXX.XXXXXXXXX.XXX.XXX..X.X.XXXX..XX.XXX....XXXX...X..X.XXX.XX.X.X.X.XX.XX.X.X......XX.X.XX..X....XXXX.X.X...X..X..X.X...X.XX..X.XX.X.XXXXXXXX.XX.X..X.....X.X.XX...XXX....XX..X.XXX.X..X.X..X..XXXX.XX.X.X.XX..XX.X..XXX...

output:

13/1

result:

ok single line: '13/1'

Test #137:

score: 1
Accepted
time: 218ms
memory: 29968kb

input:

16 80000
......................................................................................................................................................................................................................................................................................................

output:

2433/1

result:

ok single line: '2433/1'

Test #138:

score: 1
Accepted
time: 210ms
memory: 29580kb

input:

16 80000
......................................................................................................................................................................................................................................................................................................

output:

4865/2

result:

ok single line: '4865/2'

Test #139:

score: 1
Accepted
time: 186ms
memory: 26552kb

input:

16 65535
......................X....X....X.XXX................XX.........X.X.....................................X.....X............X...........................X.....X......X.X............X.....X....X....X..XX........X.X......................XX...X..XXXXX................................X....X..........

output:

1861/1

result:

ok single line: '1861/1'

Test #140:

score: 1
Accepted
time: 185ms
memory: 27220kb

input:

16 65535
.X..........................................................XXXXX.....XXXXX..........X......X...............................................................................................................XX...XX...............................................XXX.XX..............................

output:

3721/2

result:

ok single line: '3721/2'

Test #141:

score: 1
Accepted
time: 242ms
memory: 29724kb

input:

16 80000
......................................X..X.X..X............................................XX...X...............................X......................X................X...........X.X............................X.........................................................XXXX.....................

output:

3794/13

result:

ok single line: '3794/13'

Test #142:

score: 1
Accepted
time: 244ms
memory: 29868kb

input:

16 80000
.............................................X.XX....X.XX.........................................................................................................................................................................................................X.............X...X.................

output:

74012/3

result:

ok single line: '74012/3'

Test #143:

score: 1
Accepted
time: 182ms
memory: 29652kb

input:

16 80000
XXXXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXX.X.XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXX.XXXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.XX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXX....

output:

16358/3

result:

ok single line: '16358/3'

Test #144:

score: 1
Accepted
time: 177ms
memory: 27148kb

input:

16 65536
.....XXXXX...............................X.........................X.........................................................XX.............................................................XX...XXX.............X.....................X............X.XX...X..........................XX.......XXXX...

output:

51741/5

result:

ok single line: '51741/5'

Test #145:

score: 1
Accepted
time: 205ms
memory: 29824kb

input:

16 80000
......................................................................................................................................................................................................................................................................................................

output:

70807/8

result:

ok single line: '70807/8'

Test #146:

score: 1
Accepted
time: 177ms
memory: 26212kb

input:

16 65537
...........................................X........X...X...X............X......XXXX...............X............X...........X..X........................................X.................X........XX...........................XXXXXX......................X...........................X.............

output:

57/1

result:

ok single line: '57/1'

Test #147:

score: 1
Accepted
time: 179ms
memory: 26092kb

input:

16 65537
.XX..........XX.........................................X.XX..X.XX.........X.X.....X............................X.......................................................X..................X...............................XXXX.X.X..XXX.XXXXXXX.....................................XXXX.............

output:

113/2

result:

ok single line: '113/2'

Test #148:

score: 1
Accepted
time: 211ms
memory: 29048kb

input:

16 80000
..X.X.X.X.X.X.X.X.X.X.X.XX...XXX...X...XX.X.X.X..XXX..X.X..X..X..XX.X.....X..XXX.X...X.X..XXX..X..X..X..X..X..XX..X.X.X..X..XX..X..XX..X..X..X.X..X..X..X..XX..X.X..XX..XX..XX..X..X..XX..X.X..X..X..X..X..X..XX..XX.XX..XXX..X....X..X..XX..X..X.X..X..X..X.X..XX..X..XX..X.X..X..X..XX..X..XX..X....

output:

3/1

result:

ok single line: '3/1'

Test #149:

score: 1
Accepted
time: 228ms
memory: 29592kb

input:

16 80000
..X.X.X.X.X.X..X..X.X.X.X.X.X.X.X.X.X.X.X.X.X.X..X..XX.X..X..X.X..X..X.X..X..X..X..X..X..X..X..X.XX..X..X..XX.X..X..X.X..XX..XX..X.XX..X..X.X..X..XX..XX.X..X..X..XX..X..XX..X..XX..X.X..X.X..X..X.X..X.X..X.X.X.X..X.X..X.X..X..XX..X..X..X.X..X..X..XX..X..X..X..X..X..X..X..X..X..X..X.X..X..XX....

output:

5/2

result:

ok single line: '5/2'

Test #150:

score: 1
Accepted
time: 214ms
memory: 29512kb

input:

16 80000
..XX..XX..X.X..XX..XX.X..X.X..X.X.XX.X..X..X.XX..X..XX..X.X..XXX..X..XX..X..X.X..XX..XX..X.X..X.X..XX..X.X.X..XX..XX..X..XXX..X..X..X.X..X..XX.X..X..X..X.X..XX.X.X..X.X..X..X..XX..X.X.....X.X..X.X..X..XX..XX..X..X..X..X..X..X..XX..X..X..XX..X.XX..X..X..X.X..X..X..XX..X.X..XX..X.X..XX..X..XX...

output:

3/1

result:

ok single line: '3/1'

Test #151:

score: 1
Accepted
time: 225ms
memory: 29128kb

input:

16 80000
X..X.X.X..X..X..X.X..X..X..XX..X..X..X..XX.....XX.....XXX..X..XX..X..X.XX..X.X.X..XXX..X..XX..X.X..X..X..XX.X..X..XX..X..X.X..XXX.X.....X..X..X.X.X..X.X..XXX..X..X..X..X.X.X..X..X.X.....X.X....X.X..XX..X..X..XX..X..XX..X.X.X..X.X.X.X..XX..X..X..X.X..XX..XX..X..X.X..X..XX..X..XX..XX..X..X..X...

output:

5/2

result:

ok single line: '5/2'

Test #152:

score: 1
Accepted
time: 245ms
memory: 30544kb

input:

16 80000
..XXX.X.X.X.X.X.X.X.XXXXXXX.XXXXX.X.XXXXXXX.XXX.XX...X...X...XX.X.X.XXX.X.X.XX..XXXX.X.XXXXXX.XXXXX.X..X.X.XXXX..XXXX..XX..XXX.XXX.X.X....XX..XX..XX..XXXXX.X..X..X.X..XX..X..XX..X..X..X..XX.X..X.XX..X.XXXX..XX.X..XX..X.X..X..X..XX..XX.X.X.XXXX.X..X..XX.XXXXX..X.X.X..X.X..XXXXX.X..X..XXX.XXX...

output:

3/1

result:

ok single line: '3/1'

Test #153:

score: 1
Accepted
time: 262ms
memory: 30012kb

input:

16 80000
..XXX.XXXXX.XXXXX.X.XXXX...XX.X.XXXX...XX.X.XX...XXXX.XXX.X.XXXXX.X.X.X.X..XXX.X..X..XXXX.X.XX.X.XX..X..X.X..X.....X.X.XXXX..X..X..X.....X..X..XXX.X..XX.X.X..XX.XX..X..XX..X.X..X..X.X..X..X..XXX..XX..XXXX..X.X..X.X.X..X..X..X.X..X.XXXX..X.X..X..XX..X.X..X..XXXXX..X..X..X..X..X..X..X.XX..X.X...

output:

5/2

result:

ok single line: '5/2'

Subtask #9:

score: 1
Accepted

Test #154:

score: 1
Accepted
time: 345ms
memory: 32092kb

input:

17 90000
XXX.XX.XXXX.X..X..XX.XXX..XX.X....X..X..XXXXX.XX....X.XX.X.XXXXX.X..X....X..XX..X.X.XX.XX..X.XX..XX...X.XXXXX.......X...XX......X..XX.......XX..X.X..X.X.X.XX..X..XXX.XXXXX..XX.XX.X....X.XXX.X.X.XXXXXX..XX.XX.X....X......X..XX...X.XXX.X..XXX.XX.X..XXX.XXXXX.X.XXXX.X.X..X.XXX....X.X..XXX.XX.....

output:

13/1

result:

ok single line: '13/1'

Test #155:

score: 1
Accepted
time: 274ms
memory: 33200kb

input:

17 90000
......................................................................................................................................................................................................................................................................................................

output:

2643/1

result:

ok single line: '2643/1'

Test #156:

score: 1
Accepted
time: 273ms
memory: 33720kb

input:

17 90000
......................................................................................................................................................................................................................................................................................................

output:

5285/2

result:

ok single line: '5285/2'

Test #157:

score: 1
Accepted
time: 296ms
memory: 33112kb

input:

17 90000
.............................................XX.....XX.X......X..............................................XX.XX................X.XX.X..........................................................................X.............X...XXX.......XX.XXXXX...........................X................X...

output:

2422/1

result:

ok single line: '2422/1'

Test #158:

score: 1
Accepted
time: 286ms
memory: 33736kb

input:

17 90000
X.......................X.XXX...........X......................................X................................X..X.X..........................................................XX.XXX...............XXX..X.......................................X...X..X................................X...........

output:

2272/1

result:

ok single line: '2272/1'

Test #159:

score: 1
Accepted
time: 325ms
memory: 33296kb

input:

17 90000
XX..X......X..............X.............X..................X.................................................................................................................XX................X...............X......X....................X........X....X......XXXX............XX.......X....X.......

output:

54074/11

result:

ok single line: '54074/11'

Test #160:

score: 1
Accepted
time: 317ms
memory: 33424kb

input:

17 90000
............................X...................X...................XXX...X.................................................X....................................................XX......X................................................................X..................X......XX.X..............

output:

58537/7

result:

ok single line: '58537/7'

Test #161:

score: 1
Accepted
time: 274ms
memory: 32436kb

input:

17 90000
....X............X..............X.........X...........................XX...XXX...................................................................................................................................................................X..X......XXXX.......................................

output:

69099/11

result:

ok single line: '69099/11'

Test #162:

score: 1
Accepted
time: 190ms
memory: 26508kb

input:

17 65536
..XX..............X......................................................XXX........X..X.X.........X.......................................XX......................................................X.X.......................................................XXX......................................

output:

40807/3

result:

ok single line: '40807/3'

Test #163:

score: 1
Accepted
time: 268ms
memory: 33516kb

input:

17 90000
................................................................................................XXXX.......................X.X...X.X.X.XXXXXXXX.....................X.............................................................................XXX.X......X.......XX........................X......

output:

86595/8

result:

ok single line: '86595/8'

Test #164:

score: 1
Accepted
time: 248ms
memory: 33124kb

input:

17 90000
.........................................X........................................X........................................X........................................X........................................X........................................X........................................X......

output:

42/1

result:

ok single line: '42/1'

Test #165:

score: 1
Accepted
time: 263ms
memory: 32196kb

input:

17 90000
.........................................X........................................X........................................X........................................X........................................X........................................X.........................................X.....

output:

83/2

result:

ok single line: '83/2'

Test #166:

score: 1
Accepted
time: 304ms
memory: 32500kb

input:

17 90000
X.X.X.X.X.X.X.XXX.X.X.X.X.X.X.X.XXX..XXXXXX.X..X.X..X..X.X..XXX..X.X..XX.X..X..X..X..X.X..X..X.X..X..X.X..X.X..X..X.XXX.X..XX.X.X.X..X.X.X..X.X..XX.X.X..X..X..XXXXX..X.X....XX..X..X..XXX.XXXXXX.XX..X.XXX..XXXX..X..XXXXXXX.XX..XX..X.XXXXX.X..XX.XXXXX.X..XX..X..XX..X..XXXXX..X..XXXX..XX..X.X....

output:

3/1

result:

ok single line: '3/1'

Test #167:

score: 1
Accepted
time: 317ms
memory: 32680kb

input:

17 90000
...XXXX.XXX.X.XXX.X.X.X.X.X.XXX.X.X.X..XXXX.X..XXXX..X.X.X.XXX.XX..X..XXXXX.X..X..X.XX..XXX.X..X..XXXX..X.XXXXX.X..X.X..XX.X..XX..X.XX.X..XXXX..X.X..XX.X..XXX..XX..X.X..XX..X.XXX..XXX.XXXX..XXXX..XX.XX.X..X..X..XX.XXX..XXXX.XX..XXX.X.X..XX..X.X..X..XXX.X..X..X..X.XXXXX..XX.X..XX..XXXX..XXX....

output:

5/2

result:

ok single line: '5/2'

Test #168:

score: 1
Accepted
time: 316ms
memory: 32460kb

input:

17 90000
X.X.X.X.X.X.XX...X.X.X..X.XXX..X.X..X..XX..XX..X..X..XX..X.XXXXXX..X.XXXXX.X..X..XXXXX..X..XXX.XX.XX..XX.X.X.X.XXX..X.XXXX..XXXX..XX..X.XXXXXXX.X..XXX.XXXXX..X..XX..X..X..XXX..X.X..XX..X.X...XX.X..XX..XX..XXXX..XX..XX..X.X.X..X.X..X.XXXXXXXXX..X.XXXX..X..X..XX....X..XX..XX.X..XXXXX..X.XXX.....

output:

3/1

result:

ok single line: '3/1'

Test #169:

score: 1
Accepted
time: 323ms
memory: 32180kb

input:

17 90000
X.X.X.X.XX...XX.X..XX.X..X..XX.X..X..XXX.X..X..XXX..X..XX.XX..X.XX..X..X.X..X..XX.X..XXX..XX..X.X..XXX..X..X.X..XX..XX.X..X.XXX.X..XX.X.X..XX..X.X.XXXX..X..X.XXX..XXXXXXXX.....XX.X..X.XX..XXXX..XX..X.XX..XX..X.X.XX.X.X..XXX..XX.X..X..XXXX.....XXX.X..X..XX.X.X..X..XXXXX..X..XX..XXX..XXXXX..X...

output:

5/2

result:

ok single line: '5/2'

Test #170:

score: 1
Accepted
time: 306ms
memory: 32136kb

input:

17 90000
..XXXXX.X.X.X.X.X.XX...XX.X.X.X.XXXXXXX.XXX.X.X.X.X.X.X.X.X.XXXXXXXXX..XX..XX.X..X.X..X..XXXXXXX.X..XX.X..X..X..X.XX..XXX..X..XXX..XXXX.....X.XXX..X..X..X..XXX.X.XX..XXX..X..X..X.X..XXXX..XXXXX..X..XXXX..X..X..X..X..X..XXXX..X..XX.X..X.XXXXX.XX..X..XXX..XX..X..XX..XXXX.X..X..XX.X.XX..X.XX.....

output:

3/1

result:

ok single line: '3/1'

Test #171:

score: 1
Accepted
time: 318ms
memory: 31944kb

input:

17 90000
..X.XX...XXXX.X.X.X.XXX.X.X.X.X.XXX.X......XX.X.X.XXXXX.X.X.X.XX.XXX.XX..X.X..XXX..XX.X..XX.XX..XXXX..X..XXXXXX..X.X.XX..X.X..X.XX..XX..XXX..XXX..XXX..X.X.X..XX..XX..X..X..X..XX..X..XX..XXXXXXX.XX.X..X..X..X..X..X.X.X.X..XX.X..X..X.X..X.X..X..XXXX..XX..XX..XX..XX..XXX..X..X..XX.X..X..X..XX....

output:

5/2

result:

ok single line: '5/2'

Subtask #10:

score: 1
Accepted

Test #172:

score: 1
Accepted
time: 356ms
memory: 45156kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

50000/1

result:

ok single line: '50000/1'

Test #173:

score: 1
Accepted
time: 333ms
memory: 45192kb

input:

18 100000
.....X...................................X....................X....................XX..............X................X...X.............................................................................................................................................XXXX...........................

output:

10747/18

result:

ok single line: '10747/18'

Test #174:

score: 1
Accepted
time: 345ms
memory: 45044kb

input:

18 100000
......................................................................................................................................................................................................X...X........................................X...................XXXX..........................

output:

74774/17

result:

ok single line: '74774/17'

Test #175:

score: 1
Accepted
time: 414ms
memory: 44688kb

input:

18 100000
..XXXX..X..X................................................................X.............................................................X..X..XX...X.XXXX....X................X..X.....XXXX....................X..............................X.XXXXX.............................XXX......XX......

output:

43016/9

result:

ok single line: '43016/9'

Test #176:

score: 1
Accepted
time: 423ms
memory: 45184kb

input:

18 100000
............................XXXX.X...XX...X.............................................X..................XX....X...X............................................................................X.........................X......................X.............................X..............X....

output:

38219/8

result:

ok single line: '38219/8'

Test #177:

score: 1
Accepted
time: 378ms
memory: 45288kb

input:

18 100000
....XXX.X.....................X..X..................................X.............................X....XXXX.......................................................................X.................................................XXX...XX..X.XX.X..........................................X......

output:

12639/5

result:

ok single line: '12639/5'

Test #178:

score: 1
Accepted
time: 285ms
memory: 44452kb

input:

18 100000
XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXX..XXXXX.XXXXXX.XXX.XXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXX.XXXXXXXXXXXXX...

output:

70895/4

result:

ok single line: '70895/4'

Test #179:

score: 1
Accepted
time: 285ms
memory: 44364kb

input:

18 100000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXX.XXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

65504/5

result:

ok single line: '65504/5'

Test #180:

score: 1
Accepted
time: 332ms
memory: 44048kb

input:

18 100000
......................X.................X........................X..................................XX..............................................XX...............................................................................................................................................

output:

37160/3

result:

ok single line: '37160/3'

Test #181:

score: 1
Accepted
time: 281ms
memory: 44988kb

input:

18 100000
XXXXXXXXXXXXXXXX.X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXX.XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXX...

output:

81149/15

result:

ok single line: '81149/15'

Test #182:

score: 1
Accepted
time: 322ms
memory: 44328kb

input:

18 100000
...............X...........................XXX.X.XXX.XXX.XXXX.XXX............................................................X.............X..X.....................................................................................X.....................................X..........................

output:

16342/3

result:

ok single line: '16342/3'

Test #183:

score: 1
Accepted
time: 317ms
memory: 45436kb

input:

18 100000
.....X....X..XXXXXX...X....X.X........X.......................................................................................................XX......X....XXX.X...............XXX.......................XX...................................................X.....X....XX..........................

output:

72698/3

result:

ok single line: '72698/3'

Test #184:

score: 1
Accepted
time: 280ms
memory: 43728kb

input:

18 100000
XXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XXX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXXXXXXXXXXXXXXXXXXXX..XXXXXXXXXXXXXXXXX.X.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

56408/5

result:

ok single line: '56408/5'

Test #185:

score: 1
Accepted
time: 330ms
memory: 44172kb

input:

18 100000
.................................X..............................................................X........XX................................................................................X..................................................................................XX...............X.....

output:

81164/7

result:

ok single line: '81164/7'

Test #186:

score: 1
Accepted
time: 314ms
memory: 44760kb

input:

18 100000
..X.X.X.X.X..X.X..X.X..XX..X.XX..X..X.X..XX..X..XX..X.XX..XX..XX..XX..XX..X.X.X..XX..X.X.X..XX..XX..X..XXX..X.X..X..X..X..X..X..X..X..XX..X..X..X..X..XX..X.X..XX..X..X..XX.X..XX..X..X..XX..X..X.X..X..XX..XX..X.XX..X.X.X..X..XX..X..XX..X..X.X..X..X..XX..XX..X..X..X..XX..XXX..X..X.X.X..X.X.....

output:

3/1

result:

ok single line: '3/1'

Test #187:

score: 1
Accepted
time: 335ms
memory: 44488kb

input:

18 100000
..X.X.X.X.X..X..X.X..X..X..X..X..X..X..X..X..X..X..X..X..XXXX.X..X.....X.X..XX..X.X.X.X..X.X..X.X.X.X..X..X..XXX..X.X..XXX..X..X.X..X..X..XX..X..XX..XXX.X..X..X..XX..X.X..X..X.X..X.X.X.X..X..XX..XX..X.XX..X..X.X..X..X..XX..X..X..X..X..X.X..X..XX..X..X.X..X..X..XX..X..X.XX..X..X..X..X.X..XX...

output:

5/2

result:

ok single line: '5/2'

Test #188:

score: 1
Accepted
time: 341ms
memory: 44632kb

input:

18 100000
...XXXXXX...X...XXXXXX..X..XX...X...X...X...X...X....X...XXX..X.XX.XXX.X....X.X...X...XX....X..X..XXX........X....X.XX..XX...X.XXX.X....XX....XX....XXXX.XX..X.XXXXX.XX..XXX....X....X...X..X....X....X..XX.XX....X.XXX....X..XX....XX....X.X....X.X..X.XX....X..X..XX.XXX....XXX.X....XX....X.X.X...

output:

5/1

result:

ok single line: '5/1'

Test #189:

score: 1
Accepted
time: 361ms
memory: 44064kb

input:

18 100000
....X.X.X.XXXXXX.....X..XX..X..XX...X...X...X...X....X....X....X.X....X....XXXXX....XX....X...XX.X....X.X....X....X...X....X.XX.XXXXX....X.X.X.X.X....XX.XX...X.X.X....X...X....XX....XXX.X....X.X....XXXX....XX.X....X....X..X...X.XX..X....X.X....XX....XXXX.XX.X....XX....X..XXX.XXX....XX..XXX...

output:

9/2

result:

ok single line: '9/2'

Test #190:

score: 1
Accepted
time: 363ms
memory: 43648kb

input:

18 100000
..XX.XXX.XXXXXXXX.X..XX.X..X.XX..X..XX..XX..X.X.XX..X..XX..XXX..XX.X.XX..X..XXX..XX.XXXXX..XX..XX..X..X....X..X.XX..XX..XX.XX..XX..X..X..XX..X.XXX..XXXX..X.X..X..XX..X..X..XX..XXXXX..X..XXX..XXX.X..X.X..X..XX..X.X.X.XXXX..XX..X.XXXXX..X.X..X..XX..X..X.X.X.XX.XXXX.XX..XX.XXXXXX..X..X.X..XXX...

output:

3/1

result:

ok single line: '3/1'

Test #191:

score: 1
Accepted
time: 386ms
memory: 43844kb

input:

18 100000
X.X..XXX.XX.X..XX..XXXX.X..XXXX..X.X..X.XXX.X.X..X.X.X..XX.X..XXXX..XXX..X..XX..X.XXX..X..XXXX..X.XX..XX..X..X.X..X.XX..X..XX..X..X.XXX.XXXX..X..XXX..XXX..X.....X.XX..XXXXXXXXXXXXXX..XXXXXX.....XXXX..XX..X..X..X...X..X..X..X..XX..XXX..XXX..X.X..XXX.X..X.X..XXXX..X.XX..X..XXXX.X..XX..XXXX.....

output:

5/2

result:

ok single line: '5/2'

Test #192:

score: 1
Accepted
time: 372ms
memory: 44548kb

input:

18 100000
..X.X.X.XXX..X..XX..X.X..X.XX..X..X.X..XXXX..XX.XXXX..X..XX..X.X..X.X..XXX..XXX.X.X..XX..X..XXX..XX..X.X..X..X.....X.XX..XXX.X..X.X.X..XX..XXXX..X.X..X.XXXXX..XX..X..X..X..X..XX.X.X..X..X.XX..XXXXX..X.X..X..X..X..X.X..XXXX..X.XX..XX..XX..X..XX..XXX.XXX..XX..X..X.X..XXXXX..XX.XX..XXXXX..X.....

output:

3/1

result:

ok single line: '3/1'

Test #193:

score: 1
Accepted
time: 389ms
memory: 44700kb

input:

18 100000
X.XXXXXXX.X..X..X.X..X.X.X..XX.X...X..X..XX..XXXXXX.X..X.XXXX..X.X...X..XX.XX..X.X..XX..XX..XX.XXX..XX.XX..XXX..XX..XXX..XX.XX.X..XXXXX..XX..XX..XXXX.XXX.XXX..X..XX.XXXX..XX...X..XX..XXXXXXXX..XX..X.XX..X..XXX..X.XXX..X..X.X.X..X..X..XXX..X.X..XX.X..XXX.X.X..X.X..X..XX..X..X..XX..X..XXXXXX...

output:

5/2

result:

ok single line: '5/2'

Test #194:

score: 1
Accepted
time: 336ms
memory: 45216kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X..X..X..X.X..X.X..X..X..X..X..X.X..X.X..XXXX...X..XX.X.....X..X..X..X.X..XXXX..X..X..X..X.X..XX.X..X.X.X..XX..X..XX.X.X..X..XX..X.X..X..X..X..X.X..X.X..XX..X..XX.X..XX..X..X.X..X..X..X..X.X.X..X.X..X..XX..X..X..X..XX..X.X..XX.X..X..X..X..XX..X...

output:

3/1

result:

ok single line: '3/1'

Test #195:

score: 1
Accepted
time: 336ms
memory: 43692kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X.X..X..X....X..X..X..X.XX..XX..X.X..X..XX..X..X..X..XX..X.X..X..X..XXX..X..XX..XX..XX..X.X..X..X..X..X..X.X..X..XX..XX..XXXX..XX.X..XX..X.X..XX.X..X.X..XX..X.X..XX..X.XX..X.X..X..XX..X..X.X..X..X..XX..X.X....X.XX..XX.X..X..X..XX..X..X..X..XX.X.....

output:

5/2

result:

ok single line: '5/2'

Test #196:

score: 1
Accepted
time: 320ms
memory: 45372kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.XX...XX.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X.X..X..XX..X..X.X..X.X..X.X.X.XX..X..XX..X..XX..X.X..XX..XX..X..X.X.X..XX..X..X.X..X..X..X..XX..X..X..XX..XX.....XXX....X....X.X..X.X.X..X..X..X..X..X.X..X..XXX..XX.X..X..XXX..XX..X.X..XX.X...X..X..X.X..X..X..X.XXXXX..X...

output:

3/1

result:

ok single line: '3/1'

Test #197:

score: 1
Accepted
time: 338ms
memory: 43976kb

input:

18 100000
..X.X.X.X.X.X.X.X.X.X.X.X.X.XX...XX.X.X.X.X.X.X..X..X.X.X.X.X.X.X.X.X.XX....XX..X..X..X..X.X..XX..XX..X..XX..X.X..XX..X.X..X..X..X..X.X..X..X..X..XX..XX..X.X..X..X.X.X..X..X..X.X..X..X..XXX..XX..X..X..XX..XX..XX..XX..X..XX..XX..X.X.X.X..X..X..X.X..XX..XX..X..X..X.X..XX..X..XX..X..X..X..X.....

output:

5/2

result:

ok single line: '5/2'

Test #198:

score: 1
Accepted
time: 358ms
memory: 43920kb

input:

18 100000
XXX.X.XXX.X.XXX.XX...XX.X.X.X.X.X.X.X.XX...XX.X.XXX.X.XXX.X.XXX.X.X.X.XX...XX.XX.X.X..X..X..XX..X..X..XX..XXXXXX.XXXXXXXX..XX.X..XX.XXX..XX..XXX..XX..XX..X..XXX..XX.XX..X..X..XXXX.X.XXX..XX..XXXXX..X..X.X..XXX..XXXX..XXXXXXXXXX..X..X.X.XX..XXX..XXX..X.XX..XXX..XX..X..XXX..X.X.XX..XX.....X....

output:

3/1

result:

ok single line: '3/1'

Test #199:

score: 1
Accepted
time: 373ms
memory: 44044kb

input:

18 99999
......................................................................................................................................................................................................................................................................................................

output:

99999/2

result:

ok single line: '99999/2'

Test #200:

score: 1
Accepted
time: 373ms
memory: 44756kb

input:

18 100000
..XXX.X.X.XXXXXX...XX.X.X.XX...XX.X.XXX.X.X.X.X.X.X.XXXXX.X.X.XXX.X.X.X.X..X..X..X.X..X.X..X..X..XXX.X..XXX..X.X..X..X..XXX...XX..XX.X..XX..X..XX..X.X..XX.X..XXXXX...XXX..X..X.X..XXX..XX..X.X.X..XXX..X....XX..X..XXX.X.X.X..XXX..X..X.XX..XX..XX..X..XX..X.X..XX.XXX.XX.XXX.X.X..X.X.X.XX..X..X...

output:

5/2

result:

ok single line: '5/2'

Test #201:

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

input:

18 100000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...

output:

-1

result:

ok single line: '-1'

Test #202:

score: 1
Accepted
time: 8ms
memory: 6776kb

input:

1 100000
......................................................................................................................................................................................................................................................................................................

output:

0/1

result:

ok single line: '0/1'

Test #203:

score: 1
Accepted
time: 11ms
memory: 3552kb

input:

18 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

output:

1/2

result:

ok single line: '1/2'

Test #204:

score: 1
Accepted
time: 44ms
memory: 8764kb

input:

2 100000
....X.X..........X.X..XX......XX...X.XX.X..XX.....X..XXX...XXX..X....XXX.X.......XXXX.XXX.........X.X.X.....X..X.......XX.....XX.XX.X.....X.XXX....X..X....XXXX.X......X.XX.XX...X.......X..X...X..X.X.X.XX..X..X.XXX...X..X..XXX.X......X....X.XXXX..XXX...X..X......X.X...X.........XX...XXXXX.XX...

output:

9/1

result:

ok single line: '9/1'

Test #205:

score: 1
Accepted
time: 367ms
memory: 45300kb

input:

18 100000
.................................................X...................................................................................................................................................................................................................................................

output:

3948/1

result:

ok single line: '3948/1'

Test #206:

score: 1
Accepted
time: 439ms
memory: 43564kb

input:

18 100000
XX....X.XX.X...X..X...X.X..X.XX...X..X..XXX........XX.X......X.X.XX.X..XX...X..XXX...X..X.XX..X.X.XXX..XX.....XXXXXX.....X.XXXXXX.XXXXXX.X.X...XX.XXX.X.....XX...XXXXXX..XX..X.XX....X.......XXXXX...X....X..XXX.XXXXX..X.XXX..XXXX...XX...X.XX..XX.X.X...XX.XXX.X..XXX.XX..X.X.X.XX..XXX.XX..XX.....

output:

13/1

result:

ok single line: '13/1'

Test #207:

score: 1
Accepted
time: 16ms
memory: 3500kb

input:

18 17
.....X..XX.X...X.
XX.XX..X.X...X.X.
XXXXX....XXXX..X.
X..X.X..XX.X.XXXX
...XXX.XXX.XXXXXX
XXXXXX.X.....XX.X
XX...X.X.XX...X.X
..X.XXX...XX.XXXX
X.XXXXXXXXX..XXX.
....X.X..XX.XX.X.
X..X.X...X.X.XX..
X.....XX....XX.XX
X....XX......XXXX
XX.XX..X...XX..XX
X....XX.X.XX...X.
X.X..X.XX.X....XX
...XXX...

output:

2/1

result:

ok single line: '2/1'

Test #208:

score: 1
Accepted
time: 3ms
memory: 5612kb

input:

18 100000
X.X...XXX.X..XXX.X.XX.XXXX.......X..XX..X..X..X.X..X.XXX..XX....XXXXXXX..X..X.X.X.X...X.....XX....X.......X.XXXX...X.XX..X...XX.X.XXXX.X.XXX.X.X.X.XXX..XXX..X...XX.XX..X.XX...XXX...X...X..XX.XXXXXX..X.XX.XXXX.XXXXX.XX.X...XX.XXX..X...X..X...XXXXXXX.X.X.XX.XX.X..X..XX.X...XX.XXXXXXX.XX...X....

output:

-1

result:

ok single line: '-1'

Test #209:

score: 1
Accepted
time: 446ms
memory: 44708kb

input:

18 100000
XXXXXXXXXXXXX.XXXXXXXXXXX.X.XXXX.XXXX.XX.XXXXXXX.XX.XX.XXX.XXXX.XX..XXXXX.XXXX.XXXXXXX.XXXXX.XXXXX.XX.X..X...XX.XXXXXXXX.XXXXXXX.XX.XX.XXXXXX.XXXXX..X..X.XXXX...XXXX.XXX.XXXX.XXXXXXX.XXXXXXXXXX.XXXXX.XXX.XX.XX..X.XXXXXXXXX.XX..XXXX.XXX.XX..X...XXXXXXXXXXXXX.XXXXXX.XX.XXXX..XXXXXXXXXX.X.XXX...

output:

0/1

result:

ok single line: '0/1'

Test #210:

score: 1
Accepted
time: 271ms
memory: 44264kb

input:

18 100000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X..XXXXXXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXX.XXX.XXXXX.XXXXXXXXXXXXXXX.XXXX.XX.XXXXXXXXXXXX...XXXXXXXXXXXXXXX.XXXXXXXX.XXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXX.XXXXXXXXXXXX.XXX...

output:

0/1

result:

ok single line: '0/1'

Test #211:

score: 1
Accepted
time: 341ms
memory: 45632kb

input:

18 100000
XXXXXXXXXXXXXXXXXX..XXXXXXXXXXXX.XXXXXXX..X.XXXXXXXX..XXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.XX.XXX.XXXXXXXXXXXXXXXXXXXXXXXXX.XXXX.XXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXXXXXXXXXXXXXXXXXXXXXXX.XX.XXXX.XXXX.XXXXXXXXXXXXXXXX.XXXXXXXXX.XXXXXX.XXX...

output:

2734/1

result:

ok single line: '2734/1'

Test #212:

score: 1
Accepted
time: 335ms
memory: 44904kb

input:

18 100000
XXXXXXXXXXXXXXXXXXX.XXXXXXX.XXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX.XXXXXXXXXXXXXXXXXXXXX.XXXX..XXXXXX.XXXXX.XXXX.XXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXX...

output:

2721/1

result:

ok single line: '2721/1'

Test #213:

score: 1
Accepted
time: 365ms
memory: 44320kb

input:

18 100000
..........................................................................................................................................................XX.........X..X..X..................X......................................................................................................

output:

3058/1

result:

ok single line: '3058/1'

Test #214:

score: 1
Accepted
time: 361ms
memory: 44036kb

input:

18 100000
.....................XXX..XX........XX.............................................X.........X...X..........X.......................XXXX..X.....................................................................................................................................................X....

output:

3049/1

result:

ok single line: '3049/1'

Test #215:

score: 1
Accepted
time: 337ms
memory: 43960kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

2836/1

result:

ok single line: '2836/1'

Test #216:

score: 1
Accepted
time: 342ms
memory: 43844kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

5671/2

result:

ok single line: '5671/2'

Test #217:

score: 1
Accepted
time: 359ms
memory: 44060kb

input:

18 100000
X..X.X............................X............................................X............X.................X.......XXX............X........X........X.......X..XX.................................................................................................................................

output:

2706/1

result:

ok single line: '2706/1'

Test #218:

score: 1
Accepted
time: 337ms
memory: 45416kb

input:

18 100000
.......................................................X......................X....X............XX....XX.X.................................XXX...............................XX.................................X...XXXXX...........X................................................................

output:

2705/1

result:

ok single line: '2705/1'

Test #219:

score: 1
Accepted
time: 348ms
memory: 44548kb

input:

18 100000
...................X..X...........X.........X.XXXX....X...X...X.............X......XXX.................................................XXX...X..................XXX...X.............................................................X...XXX..X.XX...X...................X............................

output:

2875/1

result:

ok single line: '2875/1'

Test #220:

score: 1
Accepted
time: 345ms
memory: 45492kb

input:

18 100000
..............X.X......X.X............XX.............X.XXXXXXX..........X................................................................................................................................X...........X.XXXXX.XX.....................X........................XX.X....XXX......X......

output:

2872/1

result:

ok single line: '2872/1'

Test #221:

score: 1
Accepted
time: 387ms
memory: 43736kb

input:

18 100000
....X...............XX.X..............................XXXXX..XX..............X................X.........XXXX..............................................X........................X.XXXXX.X.........................X....................................XXXXX......................................

output:

2063/1

result:

ok single line: '2063/1'

Test #222:

score: 1
Accepted
time: 370ms
memory: 44424kb

input:

18 100000
............................X..........................................................................................................X.....X.......................................................................................................................................................

output:

2044/1

result:

ok single line: '2044/1'

Test #223:

score: 1
Accepted
time: 334ms
memory: 43704kb

input:

18 100000
.....................................................................................................................................................................................................................................................................................................

output:

2235/1

result:

ok single line: '2235/1'

Test #224:

score: 1
Accepted
time: 338ms
memory: 44708kb

input:

18 100000
.....................................X...............................................................................................................................................................................................................................................................

output:

4469/2

result:

ok single line: '4469/2'

Extra Test:

score: 0
Extra Test Passed