QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#352190#5473. Move One Coinwarner1129#AC ✓666ms11460kbC++205.2kb2024-03-12 22:59:302024-03-12 22:59:31

Judging History

你现在查看的是最新测评结果

  • [2024-03-12 22:59:31]
  • 评测
  • 测评结果:AC
  • 用时:666ms
  • 内存:11460kb
  • [2024-03-12 22:59:30]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

template <ranges::range T,
          class = enable_if_t<!is_convertible_v<T, string_view>>>
istream &operator>>(istream &s, T &&v) {
    for (auto &&x : v)
        s >> x;
    return s;
}
template <ranges::range T,
          class = enable_if_t<!is_convertible_v<T, string_view>>>
ostream &operator<<(ostream &s, T &&v) {
    for (auto &&x : v)
        s << x << ' ';
    return s;
}

#ifdef LOCAL
template <class... T> void dbg(T... x) {
    char e{};
    ((cerr << e << x, e = ' '), ...);
}
#define debug(x...) dbg(#x, '=', x, '\n')
#else
#define debug(...) ((void)0)
#endif

#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define ff first
#define ss second

template <class T> inline constexpr T inf = numeric_limits<T>::max() / 2;
template <class T> bool chmin(T &a, T b) { return (b < a and (a = b, true)); }
template <class T> bool chmax(T &a, T b) { return (a < b and (a = b, true)); }

using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;

constexpr i64 mod = 998244353;

void solve() {
    auto Read = [&]() -> vector<pair<int, int>> {
        int r, c;
        cin >> r >> c;
        vector<string> G(r);
        cin >> G;

        vector<pair<int, int>> V;
        for (int i = 0; i < r; i++)
            for (int j = 0; j < c; j++)
                if (G[i][j] == 'o') {
                    V.emplace_back(i, j);
                }
        sort(V.begin(), V.end(), [](pair<int, int>& lhs, pair<int, int>& rhs){
            return lhs.ff+lhs.ss < rhs.ff+rhs.ss;
        });
        return V;
    };

    auto A = Read();
    auto B = Read();

    auto Rotate = [](auto &V) -> void {
        for (auto &[x, y] : V) {
            tie(x, y) = pair{-y, x};
        }
    };
    
    auto get = [](const auto &A) -> vector<pair<int, int>> {
        vector<pair<int, int>> R;
        for (auto p : A) {
            R.push_back(p);
            if (R.size() >= 3) break;
        }
        return R;
    };

    auto shi = [](auto V, pair<int, int> b) {
        for (auto &[x, y] : V) {
            x -= b.ff;
            y -= b.ss;
        }
        return V;
    };
        
    auto pB = get(B);
    for (int t = 0; t < 4; t++) {
        Rotate(A);

        sort(A.begin(), A.end(), [](pair<int, int>& lhs, pair<int, int>& rhs){
            return lhs.ff+lhs.ss < rhs.ff+rhs.ss;
        });
        
        debug(t);
        auto pA = get(A);

        for (auto [x, y] : A) {
            debug(x, y);
        }
        for (auto [x, y] : B) {
            debug(x, y);
        }

        for (auto p : pA)
            for (auto q : pB) {
                auto U = shi(A, p);
                auto V = shi(B, q);

                sort(all(U));
                sort(all(V));

                vector<bool> matU(U.size()), matV(V.size());
                
                for (int i = 0, j = 0; i < U.size(); i++) {
                    while (j < V.size() and V[j] < U[i]) {
                        j++;
                    }
                    if (j < V.size() and U[i] == V[j]) {
                        matU[i] = matV[j] = 1;
                    }
                }
                for (int i = 0, j = 0; i < V.size(); i++) {
                    while (j < U.size() and U[j] < V[i]) {
                        j++;
                    }
                    if (j < U.size() and V[i] == U[j]) {
                        matV[i] = matU[j] = 1;
                    }
                }
                
                if (ranges::count(matU, 0) == 1 and ranges::count(matV, 0) == 1) {
                    debug(p.ff, p.ss);
                    debug(q.ff, q.ss);
                    pair<int, int> fr, to;
                    for (int i = 0; i < U.size(); i++)
                        if (matU[i] == 0) {
                            fr = U[i];
                            break;
                        } 
                    for (int i = 0; i < V.size(); i++)
                        if (matV[i] == 0) {
                            to = V[i];
                            break;
                        }
                    debug(fr.ff, fr.ss);
                    debug(to.ff, to.ss);
                    
                    fr.ff += p.ff;
                    fr.ss += p.ss;
                    to.ff += p.ff;
                    to.ss += p.ss;
                    
                    debug(fr.ff, fr.ss);
                    debug(to.ff, to.ss);
                    
                    for (int g = t + 1; g < 4; g++) {
                        tie(fr.ff, fr.ss) = pair{-fr.ss, fr.ff};
                        tie(to.ff, to.ss) = pair{-to.ss, to.ff};
                    }

                    swap(fr.ff, fr.ss);
                    swap(to.ff, to.ss);
                    cout << fr.ff << ' ' << fr.ss << '\n';
                    cout << to.ff << ' ' << to.ss << '\n';
                    
                    return;
                }
            }
    }
    
    assert(0);
}

signed main() {
    cin.tie(0)->sync_with_stdio(false);
    cin.exceptions(cin.failbit);
    int T = 1;
    // cin >> T;
    while (T--)
        solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2 3
xox
ooo
4 2
ox
ox
ox
ox

output:

1 0
-1 1

result:

ok OK! rot=1

Test #2:

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

input:

3 3
xox
oxo
xox
4 4
oxxx
xxox
xoxo
xxxx

output:

0 1
3 -1

result:

ok OK! rot=1

Test #3:

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

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

498 499
996 997

result:

ok OK! rot=2

Test #4:

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

input:

500 500
oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 0
498 498

result:

ok OK! rot=0

Test #5:

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

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

499 0
996 -498

result:

ok OK! rot=2

Test #6:

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

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 499
497 1

result:

ok OK! rot=0

Test #7:

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

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

1 498
499 0

result:

ok OK! rot=1

Test #8:

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

input:

500 500
oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 0
498 498

result:

ok OK! rot=1

Test #9:

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

input:

500 500
xooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

1 1
499 499

result:

ok OK! rot=2

Test #10:

score: 0
Accepted
time: 2ms
memory: 3856kb

input:

500 500
oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 0
498 498

result:

ok OK! rot=0

Test #11:

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

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

499 1
997 -497

result:

ok OK! rot=1

Test #12:

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

input:

500 500
oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 0
498 498

result:

ok OK! rot=1

Test #13:

score: 0
Accepted
time: 70ms
memory: 11460kb

input:

500 500
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...

output:

80 70
483 173

result:

ok OK! rot=1

Test #14:

score: 0
Accepted
time: 418ms
memory: 6300kb

input:

302 302
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

256 0
0 180

result:

ok OK! rot=0

Test #15:

score: 0
Accepted
time: 27ms
memory: 6320kb

input:

302 302
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxx...

output:

287 0
0 63

result:

ok OK! rot=1

Test #16:

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

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxoxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

250 0
250 500

result:

ok OK! rot=0

Test #17:

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

input:

499 499
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 498
249 249

result:

ok OK! rot=1

Test #18:

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

input:

3 3
oxo
xox
oxo
3 4
oxox
xxxo
oxox

output:

1 1
1 3

result:

ok OK! rot=1

Test #19:

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

input:

3 3
oxo
xox
oxo
4 3
xox
oxo
xxx
oxo

output:

1 1
3 1

result:

ok OK! rot=1

Test #20:

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

input:

500 500
oooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

499 499
-497 -498

result:

ok OK! rot=0

Test #21:

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

input:

500 500
oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 0
996 997

result:

ok OK! rot=0

Test #22:

score: 0
Accepted
time: 3ms
memory: 3884kb

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 499
976 -477

result:

ok OK! rot=0

Test #23:

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

input:

1 2
oo
1 3
oxo

output:

0 0
1 2

result:

ok OK! rot=1

Test #24:

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

input:

1 2
oo
2 2
ox
xo

output:

0 0
0 1

result:

ok OK! rot=1

Test #25:

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

input:

10 10
oooxxxxoxx
xoxoxxxxxx
xooxxooxoo
ooxoxoxxoo
oooooxxoxx
xxxoxxoxox
oxoxxxxxox
xoxoxoxxoo
xooxxxxoxx
xxxxxxxoxx
10 10
xooxxxxoxx
xoxoxxxxxx
xooxxooxoo
ooxoxoxxoo
oooooxxoxx
xxxoxxoxox
oxooxxxxox
xoxoxoxxoo
xooxxxxoxx
xxxxxxxoxx

output:

0 0
3 6

result:

ok OK! rot=0

Test #26:

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

input:

11 9
xoxxoxoox
xxxxxxoxx
xoxoxxoxx
oxoooxooo
oxxxxxxxx
xxoxoxoxx
xxooxxxxo
oxooxooox
xxoxxxxxx
oxxoxxxox
xxxxxooxx
9 11
xoxoxxooxxx
xxxxxxxxoxo
xxooooxoxxx
xoxooxxooxx
xxxxooxoxxx
oxxoxxxxxxx
oxxoxoxoooo
xoxoxxxoxxo
xxxxoxxoxxx

output:

4 0
4 6

result:

ok OK! rot=3

Test #27:

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

input:

8 13
xxxxoxxxxxxxx
oxxxoxxxxxxxo
oxxxoxxxxxxxo
oxoxxxxxoxxxx
xoxxxxooxxxxx
xoxxoooxxxxxx
xoxxxxoxxoxxo
xoxxxxoxxxxox
8 13
xxxxxooxxxxox
oxxoxxoxxxxox
xxxxxxoooxxox
xxxxxooxxxxox
xxxxoxxxxxoxo
oxxxxxxxoxxxo
oxxxxxxxoxxxo
xxxxxxxxoxxxx

output:

11 7
7 7

result:

ok OK! rot=2

Test #28:

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

input:

7 16
xoxoxoxooxoxoxoo
xxxxoxxxoxxooxxx
xooxoxxooxxxoxox
oxxoxxxxxxoooxxx
xxxxoxxoxxxxxoxx
xxoxxxxoxoxoxxxx
xoooooxooxoxoxxx
7 16
xxxoooxxoxooooox
xxxxoxoxoxxxxoxx
xxoxxxxxoxxoxxxx
xxxoooxxxxxxoxxo
xoxoxxxooxxoxoox
xxxooxxoxxxoxxxx
ooxoxoxooxoxoxox

output:

8 6
11 6

result:

ok OK! rot=2

Test #29:

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

input:

14 7
xxxxxox
oxooxxx
xxooxox
xxxooxx
oxxoxxx
xooxxox
xxxoxxx
oxxoxxx
oooxxox
xoxoxxx
xxxoxox
ooxxxxx
xxooxox
ooxxxxo
14 6
oxxxoo
oxooxx
xxxxoo
oxoxxx
xxoxox
oxxooo
xxoxxo
xxoxxx
oxxoox
xxoxxo
xooxxx
oxooxx
xxooxo
oxxxxx

output:

6 13
5 13

result:

ok OK! rot=2

Test #30:

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

input:

4 10
oooxxoxxox
xoxxxoxxxo
oxxxxxxxxx
oxxoxxxxox
12 4
xxxo
xxxx
ooxx
xxoo
xxxo
oxxx
xxxx
xxoo
xxxx
xxxx
oxxo
xxox

output:

0 0
-2 0

result:

ok OK! rot=3

Test #31:

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

input:

9 9
xxxoxxoxo
xxxxoxxxx
xoxxxoxox
xxooxxxxo
xxxxoxoxx
oooxooxox
xxxxxxxox
oxxxoxxox
ooooxxxxo
10 9
oxxxxoooo
xoxxoxxxo
xoxxxxxxx
xoxooxooo
xxoxoxxxx
oxxxxooxx
xoxoxxxox
xxxxoxxxx
oxoxxxxxx
xxxxxoxxx

output:

3 0
3 -1

result:

ok OK! rot=2

Test #32:

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

input:

12 9
xxoxoxxxx
xxxxxxxxx
xoxxxxxxx
xxoxxxxxx
ooxxxoxxx
xxxxoxoxo
xxxoxxxxx
xxxxxoxxx
xooxxxxxx
oxxxooxxx
xoxoxxxxx
xoxxoxoxx
8 12
xxxxxxoxxxxx
xxxxxoxxxxxo
xxxxoxxoxoxx
oxxxxoxxxoxo
xxxxxxoxxxox
oxxoxxxxoxxx
xxoxoxxxoxoo
xxxxoxxxxoxx

output:

8 5
7 6

result:

ok OK! rot=1

Test #33:

score: 0
Accepted
time: 5ms
memory: 3712kb

input:

50 50
oxxooxoooxoooxxoooxxxooxxooxxooxooxooooxoxxxooxxxx
xxoooooxooxxxxxooxxxxxoxooooxooxxxoxxxxoxxoooooxox
ooooooooxxxooxxooxoooxoxoxoooxxxxoxoxoxooooooxooxo
xooooxoxxxoxoxxxxoxoxoxxoxooxxooxxoooxooxxoxxxoxox
xoxxxxoxxxxoxxxooooooxoooxoxoxxoooooooxoooooooxoxx
xoxoxooxxxoxooxoxxooxxxxxxxxxxoxooxxxoo...

output:

17 25
40 36

result:

ok OK! rot=0

Test #34:

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

input:

50 50
xxxoxoxxxooxxoxooxoooxoxxooooxoxooooxxoxxxxxxoxooo
xoxxxoxxoxxxoxxxoxoooxxxoxxxoxooxoxoxooooxooooxxoo
oxoxxoooxxooooxxxxooxxoxxoooxxxoxoxooxxoxoxxoxxxxx
xxoxxoooxxoooxxxxxxooxxxoooooxooxoxooxxooooxxxoxxo
ooxxoxoxoooxxoooxoxooxxoxoxxxoxxoxooxxxxooooxooxox
xoxxxooooxooxxxoxxxxxooxxxoooooxxoxooxx...

output:

8 9
28 18

result:

ok OK! rot=1

Test #35:

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

input:

50 50
ooxooxxxoxoooooxoxoxooxoooooooxxoooxoxoooooxxxoxoo
xoxoxxxoxxxooxoooxxoooooooooxoxooooxoooooooxxxoxoo
xxxxxooxooxxxxxxxxxooooxooxxxxoxxoxxoxoooxxxxxxoox
ooxoxoxxxxxxxoxoxoxooxxoooxooxxooxooxxoxoxxooooxoo
oxoxoxxxxooxoxoxoxxoooooxxooxoxxoxooooxoxxxooooxox
oxxxoxxxxxoooxxxoooxxxxxoooooxoxooxooox...

output:

39 4
23 13

result:

ok OK! rot=0

Test #36:

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

input:

50 50
xxoxxoxoxooooxooooxoxxooxooxoooxoxoooxoxooxxoxxxxx
xxooxooooxooxooooooooxoxxxxxooooxooooooxxxoooxxoxo
xxxoooxxxooxxxoxoooxoxoooooxooxoxxxxxoooxxoxoxxoox
ooxxxooxxoxxxoooxxxoxoxxxooooxoxoooxoxoooxxoxooooo
oxoxoooooxxxooxxoxooxoooooxoxxxooxoxoxxxoxxxxooxxx
ooooooxxxxoooxxxoxoxooxoxoxxoxxoooxxxxx...

output:

20 49
47 45

result:

ok OK! rot=2

Test #37:

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

input:

50 50
ooooxxoxxxxxoooxoooooxoxoxxxxxooxxooxoxooxxoooxoxx
xoooxoxoxooxxoxxxooooooxxoxxxoxxxooxoxoxoxooooxxxo
xoxoxooxoxxooxoxoooxxooxxoxooxoxoxxooxoxooooxoxooo
oooooooooxxoxxooxoooooxxoooxooxooxxoxooxxooxoxxooo
xxxoxoxxoxooxoooxooxxoxoxxooxxoxoxoxxoxoxoxoxxooox
xooxxooxxxoxxoxoxoxxxxxoxooxxxoooxxoxxx...

output:

49 32
35 22

result:

ok OK! rot=0

Test #38:

score: 0
Accepted
time: 2ms
memory: 3904kb

input:

50 50
oxxxxxooxxoxxxxoxoxooxxooooxxoxooxoxoxooxooxxoxxox
xxooxooxoxxoxxoxxoxxxoooxoxxoxoxooxoxxxoxxxoxooxxx
oooxxxxoxxxoxxoxxxxooxxoooxoxoxoxooxoxxxoxxxoxooxo
oxooxxxoxooxooooxoxxxxoxxooxoxoxxxooooxooxxoxooxxo
oxxoxooxooxxxxxxoooxxxxooxoooxxxxoxxoxxooxoxxooxxo
xooooooooxxoxoxoooxooxoxxoxxxxxxoxoooxo...

output:

49 23
40 40

result:

ok OK! rot=2

Test #39:

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

input:

50 50
oxoooxxoooxoxoxoxxxooxxxoxxxoxoxoxooxxxxoxoxooooxx
ooxoooxoxxxoxoooxxoxxxoxooxoxoxxoxxoooxxxxoxooxoox
xxoxxoooxoooooxoxxooxoxxooxxxxoxooxxxxxooxoxxxxxxo
ooxxoxooxxxoxoxooxoxoxxoooxoxxoxoxooooxxxxooooxoxo
ooxooxxxxoooooooxxoxxoooxooxoooxxoxxooxxxoooxoxoox
xoooooooxxoxoxoooxxxooxoxxxooxxxxxoxoxo...

output:

31 23
52 11

result:

ok OK! rot=3

Test #40:

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

input:

50 50
ooxxoxoxxoxoxoxooxoxxxoxoxxooooxxooxxooooxxxxxxoox
oxxxxooooxxxoxxxxoxxooxxoxooxooxxxooxxxxooooxxxxxx
oooxoxoxoxoooxoooxxxoooxxooooxxxoxoxoooxoxxoxxoooo
ooxxxoxxoxxoxooxoxoxxoxxxoooxxxxxxxooxxxxxoxxxxoxx
oxxoxxxooxxoxoxxxxxxoxoxxxoxxxxooxxxxooxxoxxxxxoxo
xooooxoooooxxooxoxxxoxooxxxoxooxxxoxxxx...

output:

35 9
52 3

result:

ok OK! rot=1

Test #41:

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

input:

50 50
xooxxoxxoooxxxxoxxxoooxoxoooxoxxxooxxxxooxxxxoooox
ooxxoxoxxxxxxxoooooooooxooooxoooxoxoxoxxooxooxxoox
xxooxxoxoxxooooxxxxxxxxoxxxxoxooxoxxxxoxxooxxxooxx
xxooooxxxxoxxoxxooxoxoooxoxxoxoxxxxoxooxxxxxxoxoox
xoooxoxxoxooooxooxoxxxooxxxxxxooooooxxxooooxxxxoxo
ooxxoxxxxxooxooxxoxoxooxxxoooxoxoxooxox...

output:

4 22
43 -3

result:

ok OK! rot=1

Test #42:

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

input:

50 50
oooooooxooxxoxxoxxxoxxoxooooxoxoxxxxoooxoxoxxooxxx
oooxoxooxxxoooooxoooxoxxoxxxoxoxxxoooxoxoxxoooxooo
oxxxxxoxxoxoxxxoxoxxooxoxxxxxooxxxxoxoxxoooxoxxxox
ooxoxxxxoxooxoxxooxooooooxoooxooooxxooooxxxxxoooxx
xxxxxxxxxxoooooooxooxooxooxooooxxxooooooxoxxoxoxox
xxoxoxxooxooxxxooxoxoxxoxoxxoxoxooxooxo...

output:

0 12
52 18

result:

ok OK! rot=2

Test #43:

score: 0
Accepted
time: 5ms
memory: 3656kb

input:

50 50
oxxoxxxoxxxooxooxxxxoxxooxxxoxoxxooooxxxoxxxoxooox
xxoxoxooooxoxxooxooooooxooooxoooxoxoxxoxxoxoooxooo
xxoooxoxoxooxxoxxoxxxxxoooxxxoxxxoooxoxoooxxxooxxo
ooxooxxooxxxooxoooooxxxxxoxxoooooxoxooooooooxxxoxx
xoxoxoxxxxxoxoxoxxooxxxooxxxoxooooxxoxxoooooxooxoo
xooxxxxxoxxxxxxxxxoxooxooxoooxxoxoooooo...

output:

20 49
52 -2

result:

ok OK! rot=0

Test #44:

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

input:

50 50
xooxxooxxoxoxxoxoxxooxxxxoxoxooxoooooooxxooxxooxoo
oooxxoxoxoxooxxooxooooxooxooooxxxxoooxooxxooxoooox
oxxxoxxxxoxxoxxoxxoxxxxxoxxooxoooxoooxxxoxoxoooxoo
ooxooxoxoxxxooooooxoooooxoxooxooxxxxxxxoxxxxxoxooo
oxxooxxxxooxxxxxoxxoooxxxxoxxxxxxxxooxoxxoxooxoxxo
xooxxooxoooxxooxoxoxxxxxxxxxxxxooooooox...

output:

22 49
10 -3

result:

ok OK! rot=1

Test #45:

score: 0
Accepted
time: 6ms
memory: 4440kb

input:

250 250
oxxoxxxxxxxxoxoooxxxxoooxoxxxoxxoxoxxoxoooxxxxoxxoooooxoooxxoooxxoxxoooxxooxxoxoooooooxoxxooxoxooooxooooxooxxxoooooxoxxxxxooxxoooxooxoxoooxxxoooxxxooooxxoxooxxoxxooxxxxoooxxooxxooooxxxxxxooxxxooooxoooxoxxoxoxxoxxxxoxoooxxoooxoxooooxoxxoxxxoooxoxooooo
xoooooxoxxooxoooooxoxoooooooxxooxoooxxoxo...

output:

178 249
-250 305

result:

ok OK! rot=1

Test #46:

score: 0
Accepted
time: 104ms
memory: 4504kb

input:

250 250
oooxoxxxooooooxxxxxoxxoxxoxoxoooooooooxoxxxxoooxxxoxoooxoxoxooooxxoooxxoxoxoxoooxoooxxxxoooooxxxoxxoxxxoooxoooxxooxoxoxxooxxoxoxxxooxoxxoooxooooxxxxxxxoxxooxoxxxxoxoooxoxxoxoxxxxoxooxxxooxoooxooooxoxxoooxooxxxoxxxoooxxoxxxoxoxooxxoxxxoooxoxoxxoooxxxx
xxoxoxxoooxoxooxxoxooxxxoxxxooxxxooooxooo...

output:

155 249
-250 50

result:

ok OK! rot=3

Test #47:

score: 0
Accepted
time: 96ms
memory: 4432kb

input:

250 250
oxxooxooxxoooooooxxxxoxooxxxooxoxxxxoxoxxxoxxxxooxoxooxxxxxxxxooooooxoooooxoxxoxooxoooxxoxooxoxxoxoxxooxoooooooxoxoooxoooxxoxoxoooooxxxooxoxxoxxooooxooxooxoxxxxoxoooxoooxoxooxxxxxooooxooxxxoooxooxxoooxoxxxxoxoxooxxooooxxxoxxooooxxooxoxxooxxooooxoooox
xxxooxoooooxxoxxoxxxoxoooxoxxxxxxooxoxxxo...

output:

249 154
260 -250

result:

ok OK! rot=3

Test #48:

score: 0
Accepted
time: 666ms
memory: 7664kb

input:

500 500
xooxoxooxoxooxoxoxxxxxoooooxoxxxoxoooxooxxoxxxoxxxoxoooxxooooxxxoxxxooooxooooxoxxxoxoooxxxoxxxooxxoxxoooxoxoxoxxoooxoxxooxxoxoxoxxxxxxoxoxxxxxoooxxxxxxoxxooxoxxxoooxxxooxxoxoooxoxooooxoooxooxooxooxoooxooooxoxoxxxxxoxxxxoooxxoooooxoooxoxooxoxoxooxoxxoxoxoxooooxoxoxxxooxxxxxxxoxxxooxooxooxxxoo...

output:

188 120
390 104

result:

ok OK! rot=0

Test #49:

score: 0
Accepted
time: 449ms
memory: 7508kb

input:

500 500
xxoxoxoxoxooxxxxxxoooxxoxxoxxxoxoxooooxxoxoxoooooxoooxxxoxxxooooxoxoxxxxxoxxoxoooxoxxxoxxoxoxooxxxxoxxxoxooxxxooooxxxoxxooxxxooxxxxooooooxoxoxoxoxoooxxoooxxooooxxxxoxoxooxxxoooxooooooooxoooooooooooxooxooooooxoxooooxoxxooxxooooooooxooooooxooxoxooooxooooxoooxoxxxooxoxxoooooooxxxooooxoooxoxoooo...

output:

98 295
62 338

result:

ok OK! rot=3

Test #50:

score: 0
Accepted
time: 235ms
memory: 7716kb

input:

500 500
xoxooxxooxxooxooxxoxxxoooxxooooxooxxooxxxxxxxxoxxooxoooooxxooxxxoxxxxoxxoxxxooooooxxxoxxxoxxoxxxxoxxoxxoxooxooxxoxxxoooxxoooxxxooooooxooxxxxoxxooxxxooxxxoooxoxxxxxxoxxxoxxxxxooxooxxxxxoxoxxooxxooxoxxxoxxooxxooooxxxoxxxoxooxxxxoxoxxxoxoooooooooooxooxoxxoxoxoooxxxxxxxxxxoxoooxoxxoxoooxoxxxxxxx...

output:

26 16
409 159

result:

ok OK! rot=2

Test #51:

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

input:

10 10
xxxxxxxxox
xxxxxxxxxo
xxxxxxxoxx
xxxxxxoxxx
xxxxoxxxxx
xxxxxxxxxx
xxoxxxxxxx
xxxoxxxxxx
xoxxxxxxxx
oxxxxxxxxx
10 10
xxxxxxxxxo
xxxxxxxxox
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxx
xxxxoxxxxx
xxxoxxxxxx
xxoxxxxxxx
oxxxxxxxxx
xoxxxxxxxx

output:

4 4
5 4

result:

ok OK! rot=2

Test #52:

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

input:

10 10
xoxxxxxxxx
oxxxxxxxxx
xxoxxxxxxx
xxxoxxxxxx
xxxxxxxxxx
xxxxoxxxxx
xxxxxxxoxx
xxxxxxoxxx
xxxxxxxxox
xxxxxxxxxo
10 10
xxxxxxxxxo
xxxxxxxxox
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxx
xxxxoxxxxx
xxxoxxxxxx
xxoxxxxxxx
oxxxxxxxxx
xoxxxxxxxx

output:

4 5
4 4

result:

ok OK! rot=1

Test #53:

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

input:

10 10
xxxxxxxxxo
xxxxxxxxox
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxx
xxxxxoxxxx
xxxoxxxxxx
xxoxxxxxxx
oxxxxxxxxx
xoxxxxxxxx
10 10
xxxxxxxxxo
xxxxxxxxox
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxx
xxxxoxxxxx
xxxoxxxxxx
xxoxxxxxxx
oxxxxxxxxx
xoxxxxxxxx

output:

5 5
4 5

result:

ok OK! rot=0

Test #54:

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

input:

10 10
oxxxxxxxxx
xoxxxxxxxx
xxxoxxxxxx
xxoxxxxxxx
xxxxxoxxxx
xxxxxxxxxx
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxo
xxxxxxxxox
10 10
xxxxxxxxxo
xxxxxxxxox
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxx
xxxxoxxxxx
xxxoxxxxxx
xxoxxxxxxx
oxxxxxxxxx
xoxxxxxxxx

output:

5 4
5 5

result:

ok OK! rot=3

Test #55:

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

input:

10 10
xxxxxxxxxo
xxxxxxxxox
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxx
xxxxoxxxxx
xxxoxxxxxx
xxoxxxxxxx
oxxxxxxxxx
xoxxxxxxxx
10 10
xxxxxxxxox
xxxxxxxxxo
xxxxxxxoxx
xxxxxxoxxx
xxxxoxxxxx
xxxxxxxxxx
xxoxxxxxxx
xxxoxxxxxx
xoxxxxxxxx
oxxxxxxxxx

output:

4 5
5 5

result:

ok OK! rot=2

Test #56:

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

input:

10 10
oxxxxxxxxx
xoxxxxxxxx
xxxoxxxxxx
xxoxxxxxxx
xxxxxxxxxx
xxxxxoxxxx
xxxxxxoxxx
xxxxxxxoxx
xxxxxxxxxo
xxxxxxxxox
10 10
xxxxxxxxox
xxxxxxxxxo
xxxxxxxoxx
xxxxxxoxxx
xxxxoxxxxx
xxxxxxxxxx
xxoxxxxxxx
xxxoxxxxxx
xoxxxxxxxx
oxxxxxxxxx

output:

5 5
5 4

result:

ok OK! rot=1

Test #57:

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

input:

9 11
xxxooxxoxox
oxoxxxxxxxx
xxxoxooooxx
xxooxxooxox
oxxoxoxxxxx
xxxxxxxoxxo
ooooxoxoxxo
oxxoxxxoxox
xxxoxxoxxxx
11 9
xxxxxooxx
oxxoxxxox
xxoxxxxxx
oxooxooox
xxoooxxxo
xxoxoxoxx
oxxxxxxxx
oxoooxooo
xoxoxxoxx
xxxxxxoxx
xoxxxxoox

output:

0 4
6 4

result:

ok OK! rot=1

Test #58:

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

input:

11 9
xxxxxooxx
oxxoxxxox
xxoxxxxxx
oxooxooox
xxooxxxxo
xxoxoxoxx
oxxxxxxxx
oxoooxooo
xoxoxxoxx
xxxxxxoxx
xoxxoxoox
9 11
xxxxoxxoxxx
xoxoxxxoxxo
oxxoxoxoooo
oxxoxxxxxxx
xxxxooxoxxx
xoxooxxooxx
xxooooxoxxx
xxxxxxxxoxo
xoxoxxooxxx

output:

4 10
4 4

result:

ok OK! rot=1

Test #59:

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

input:

11 9
xooxoxxox
xxoxxxxxx
xxoxxoxox
oooxoooxo
xxxxxxxxo
xxoxoxoxx
oxxxxooxx
xoooxooxo
xxxxxxoxx
xoxxxoxxo
xxooxxxxx
9 11
xxxooxxoxox
oxoxxxxxxxx
xxxoxooooxx
xxooxxooxox
xxxoxooxxxx
xxxxxxxoxxo
ooooxoxoxxo
oxxoxxxoxox
xxxoxxoxxxx

output:

4 0
4 6

result:

ok OK! rot=1

Test #60:

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

input:

9 11
xxxoxxoxxxx
oxxoxxxoxox
ooooxoxoxxo
xxxxxxxoxxo
oxxoxoxxxxx
xxooxxooxox
xxxoxooooxx
oxoxxxxxxxx
xxxooxxoxox
11 9
xoxxxxoox
xxxxxxoxx
xoxoxxoxx
oxoooxooo
oxxxxxxxx
xxoxoxoxx
xxoooxxxo
oxooxooox
xxoxxxxxx
oxxoxxxox
xxxxxooxx

output:

0 4
6 4

result:

ok OK! rot=3

Test #61:

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

input:

9 11
xoxoxxooxxx
xxxxxxxxoxo
xxooooxoxxx
xoxooxxooxx
xxxxxoxoxxo
oxxoxxxxxxx
oxxoxoxoooo
xoxoxxxoxxo
xxxxoxxoxxx
11 9
xxooxxxxx
xoxxxoxxo
xxxxxxoxx
xoooxooxo
oxxxoooxx
xxoxoxoxx
xxxxxxxxo
oooxoooxo
xxoxxoxox
xxoxxxxxx
xooxxxxox

output:

10 4
4 4

result:

ok OK! rot=3

Test #62:

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

input:

10 4
xoxx
oxxo
xxxx
xxxx
ooxx
xxxx
xxxo
oxxx
ooxx
oxoo
4 12
oxxooxxoxxox
xxxoxxxoxxxo
xxoxxxxxxxxx
xxoxxoxxxxox

output:

0 9
0 11

result:

ok OK! rot=3

Test #63:

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

input:

10 4
ooxo
xxoo
xxxo
oxxx
xxxx
xxoo
xxxx
xxxx
oxxo
xxox
4 12
xoxxxxoxxoxx
xxxxxxxxxoxx
oxxxoxxxoxxx
xoxxoxxooxxo

output:

3 0
3 -2

result:

ok OK! rot=3

Test #64:

score: 0
Accepted
time: 245ms
memory: 5064kb

input:

500 500
oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 0
499 749

result:

ok OK! rot=0

Test #65:

score: 0
Accepted
time: 218ms
memory: 5072kb

input:

500 500
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

0 499
749 0

result:

ok OK! rot=0

Test #66:

score: 0
Accepted
time: 224ms
memory: 5128kb

input:

500 500
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...

output:

499 499
0 -250

result:

ok OK! rot=0

Test #67:

score: 0
Accepted
time: 219ms
memory: 5136kb

input:

500 500
ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...

output:

499 0
-250 499

result:

ok OK! rot=0