QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#815673 | #9884. Grid Construction | ucup-team087# | AC ✓ | 2ms | 4952kb | C++14 | 6.1kb | 2024-12-15 16:21:01 | 2024-12-15 16:21:04 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
vector<string> repeat(int M, int N, int Y, const vector<string> &A) {
vector<string> ans(M);
for (int x = 0; x < M; ++x) {
const int n = A[x].size();
assert(A[x].substr(Y, 6) == A[x].substr(Y + 6, 6));
ans[x] += A[x].substr(0, Y);
for (int nn = n; nn < N; nn += 6) ans[x] += A[x].substr(Y, 6);
ans[x] += A[x].substr(Y);
}
return ans;
}
vector<string> special(int M, int N) {
if (M > N) {
const string CS = "v>^<..";
const auto res = special(N, M);
vector<string> ans(M, string(N, '?'));
for (int x = 0; x < M; ++x) for (int y = 0; y < N; ++y) {
ans[x][y] = CS[CS.find(res[y][x]) ^ 1];
}
return ans;
}
assert(M < N);
assert((N - M) % 6 == 0);
if (M == 9) {
if (N == 15) {
return {
"<<<<<<<<<<<<<<^",
"v.v.v.v.v.v.v.^",
"v>.<v>.^.<v>.<^",
"v.^.v.<<^.v.^.^",
"v>>>.<v.^>.<<<^",
"v.v.^.v>>.^.v.^",
"v>.<^>.v.<^>.<^",
"v.^.^.^.^.^.^.^",
"v>>>>>>>>>>>>>>",
};
} else {
return repeat(M, N, 3, {
"<<<<<<<<<<<<<<<<<<<<^",
"v.v.v.v.v.v.v.v.v.v.^",
"v>.<v>.^.<v>.^.<v>.<^",
"v.^.v.<<^.v.<<^.v.^.^",
"v>>>.<v.^>.<v.^>.<<<^",
"v.v.^.v>>.^.v>>.^.v.^",
"v>.<^>.v.<^>.v.<^>.<^",
"v.^.^.^.^.^.^.^.^.^.^",
"v>>>>>>>>>>>>>>>>>>>>",
});
}
} else if (M == 11) {
if (N == 17) {
return {
"<<<<<<<<<<<<<<<<^",
"v.v.v.v.v.v.v.v.^",
"v>.^.<v>.^.<v>.<^",
"v.<<^.v.<<^.v.^.^",
"v>.v>>.<v.^>.<<<^",
"v.^.v.<v.^>.^.v.^",
"v>>>.<v.^>.<<^.<^",
"v.v.^.v>>.^.v>>.^",
"v>.<^>.v.<^>.v.<^",
"v.^.^.^.^.^.^.^.^",
"v>>>>>>>>>>>>>>>>",
};
} else if (N == 23) {
return {
"<<<<<<<<<<<<<<<<<<<<<<^",
"v.v.v.v.v.v.v.v.v.v.v.^",
"v>.^.<v>.<v>.^.^.<v>.<^",
"v.<<^.v.^.v.<<<<^.v.^.^",
"v>.v>>.<<^.<v.v.^>.<<<^",
"v.^.v.<v.^>.v>.^>.^.v.^",
"v>>>.<v.^>.<v.^>.<<^.<^",
"v.v.^.v>>.^.v>>.^.v>>.^",
"v>.<^>.v.<^>.v.<^>.v.<^",
"v.^.^.^.^.^.^.^.^.^.^.^",
"v>>>>>>>>>>>>>>>>>>>>>>",
};
} else {
return repeat(M, N, 8, {
"<<<<<<<<<<<<<<<<<<<<<<<<<<<<^",
"v.v.v.v.v.v.v.v.v.v.v.v.v.v.^",
"v>.^.<v>.<v>.^.<v>.^.^.<v>.<^",
"v.<<^.v.^.v.<<^.v.<<<<^.v.^.^",
"v>.v>>.<<^.<v.<^.<v.v.^>.<<<^",
"v.^.v.<v.^>.v>.^>.v>.^>.^.v.^",
"v>>>.<v.^>.<v.^>.<v.^>.<<^.<^",
"v.v.^.v>>.^.v>>.^.v>>.^.v>>.^",
"v>.<^>.v.<^>.v.<^>.v.<^>.v.<^",
"v.^.^.^.^.^.^.^.^.^.^.^.^.^.^",
"v>>>>>>>>>>>>>>>>>>>>>>>>>>>>",
});
}
} else {
assert(false);
}
}
vector<string> solve(int M, int N) {
if (M == 2 && N == 2) return {
"<^",
"v>",
};
if (!((M % 6 == 3 && N % 6 == 3) || (M % 6 == 5 && N % 6 == 5))) return {};
if (min(M, N) <= 5 && M != N) return {};
vector<string> ans(M, string(N, '.'));
for (int m = M, n = N, off = 0; m > 1 && n > 1; m -= 2, n -= 2, off += 1) {
// cerr<<"HELP "<<M<<" "<<N<<": "<<m<<" "<<n<<" "<<off<<endl;
if (off % 3 == 0) {
if ((min(m, n) == 9 || min(m, n) == 11) && m != n) {
const auto res = special(m, n);
for (int x = 0; x < m; ++x) for (int y = 0; y < n; ++y) {
ans[off + x][off + y] = res[x][y];
}
break;
}
}
auto go = [&](int h, int i, int x, int y) -> void {
char &a = ans[off + x][off + y];
if (off % 3 == 0) {
a = "v>^<"[h];
} else if (off % 3 == 1) {
if (i % 2 != 0) a = ">^<v"[h];
} else if (off % 3 == 2) {
if (i % 2 != 0) a = "<v>^"[h];
} else {
assert(false);
}
};
for (int i = 1; i < m; ++i) go(0, i, i, 0);
for (int i = 1; i < n; ++i) go(1, i, m - 1, i);
for (int i = 1; i < m; ++i) go(2, i, m - 1 - i, n - 1);
for (int i = 1; i < n; ++i) go(3, i, 0, n - 1 - i);
}
return ans;
}
void judge(int M, int N, const vector<string> &ans) {
assert((int)ans.size() == M);
for (int x = 0; x < M; ++x) {
assert((int)ans[x].size() == N);
}
vector<vector<int>> f(2*M+1, vector<int>(2*N+1, 0));
for (int x = 0; x < M; ++x) for (int y = 0; y < N; ++y) {
const char a = ans[x][y];
assert(a == '.' || a == 'v' || a == '>' || a == '<' || a == '^');
if (a != '.') {
if (a != 'v') ++f[x + x][y + y+1];
if (a != '>') ++f[x + x+1][y + y];
if (a != '<') ++f[x + x+1][y+1 + y+1];
if (a != '^') ++f[x+1 + x+1][y + y+1];
}
}
for (int x = 0; x <= 2*M; ++x) for (int y = 0; y <= 2*N; ++y) {
assert(f[x][y] == (x + y) % 2);
}
}
void stress() {
for (int M = 1; M <= 50; ++M) for (int N = 1; N <= 50; ++N) {
const auto ans = solve(M, N);
if (ans.size()) {
cerr << M << " " << N << endl;
judge(M, N, ans);
}
}
}
int main() {
#ifdef LOCAL
stress();
#endif
int M, N;
for (; ~scanf("%d%d", &M, &N); ) {
const auto ans = solve(M, N);
if (ans.size()) {
puts("Yes");
for (int x = 0; x < M; ++x) {
puts(ans[x].c_str());
}
} else {
puts("No");
}
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3676kb
input:
3 3
output:
Yes <<^ v.^ v>>
result:
ok Correct
Test #2:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
4 4
output:
No
result:
ok Correct : No
Test #3:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
4 5
output:
No
result:
ok Correct : No
Test #4:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
11 17
output:
Yes <<<<<<<<<<<<<<<<^ v.v.v.v.v.v.v.v.^ v>.^.<v>.^.<v>.<^ v.<<^.v.<<^.v.^.^ v>.v>>.<v.^>.<<<^ v.^.v.<v.^>.^.v.^ v>>>.<v.^>.<<^.<^ v.v.^.v>>.^.v>>.^ v>.<^>.v.<^>.v.<^ v.^.^.^.^.^.^.^.^ v>>>>>>>>>>>>>>>>
result:
ok Correct
Test #5:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
1000 1000
output:
No
result:
ok Correct : No
Test #6:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
6 6
output:
No
result:
ok Correct : No
Test #7:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
7 7
output:
No
result:
ok Correct : No
Test #8:
score: 0
Accepted
time: 0ms
memory: 3948kb
input:
8 8
output:
No
result:
ok Correct : No
Test #9:
score: 0
Accepted
time: 0ms
memory: 3936kb
input:
9 9
output:
Yes <<<<<<<<^ v.v.v.v.^ v>.^.^.<^ v.<<<^>.^ v>.v.^.<^ v.<v>>>.^ v>.v.v.<^ v.^.^.^.^ v>>>>>>>>
result:
ok Correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 3936kb
input:
3 9
output:
No
result:
ok Correct : No
Test #11:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
15 3
output:
No
result:
ok Correct : No
Test #12:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
5 11
output:
No
result:
ok Correct : No
Test #13:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
605 5
output:
No
result:
ok Correct : No
Test #14:
score: 0
Accepted
time: 0ms
memory: 4952kb
input:
999 999
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #15:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
9 999
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 4732kb
input:
995 995
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #17:
score: 0
Accepted
time: 1ms
memory: 4012kb
input:
995 11
output:
Yes ^>>>>>>>>>> ^.v.v.v.v.v ^>.^.<v>.<v ^.<^>.v.^.v ^>.<v>.<<<v ^.^.v.^.v.v ^>>>.^>>.<v ^.v.^>.v>.v ^>.<^.<v.<v ^.^.<<v.^.v ^>>>.v.<<<v ^.v.^.^.v.v ^>.^>>>>.<v ^.<^.v.v>.v ^>.<^.<v.<v ^.^.<<v.^.v ^>>>.v.<<<v ^.v.^.^.v.v ^>.^>>>>.<v ^.<^.v.v>.v ^>.<^.<v.<v ^.^.<<v.^.v ^>>>.v.<<<v ^.v.^.^.v.v ^>.^>>>>...
result:
ok Correct
Test #18:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
897 27
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<^ v.v.v.v.v.v.v.v.v.v.v.v.v.^ v>.^.^.^.^.^.^.^.^.^.^.^.<^ v.<<<<<<<<<<<<<<<<<<<<<^>.^ v>.v.v.v.v.v.v.v.v.v.v.^.<^ v.<v>.^.^.^.^.^.^.^.^.<^>.^ v>.v.<<<<<<<<<<<<<<<^>.^.<^ v.<v>.v.v.v.v.v.v.v.^.<^>.^ v>.v.<v>.^.^.^.^.^.<^>.^.<^ v.<v>.v.<^>>>>>>>>>.^.<^>.^ v>.v.<v>.^.v.v.v...
result:
ok Correct
Test #19:
score: 0
Accepted
time: 1ms
memory: 4020kb
input:
663 597
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #20:
score: 0
Accepted
time: 1ms
memory: 3780kb
input:
879 45
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<^ v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.^ v>.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.<^ v.<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<^>.^ v>.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.^.<^ v.<v>.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.<^>.^ v>.v.<<<<<<<<<<<<<<<...
result:
ok Correct
Test #21:
score: 0
Accepted
time: 1ms
memory: 4184kb
input:
587 827
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #22:
score: 0
Accepted
time: 2ms
memory: 4632kb
input:
863 815
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #23:
score: 0
Accepted
time: 2ms
memory: 4252kb
input:
893 671
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #24:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
1000 996
output:
No
result:
ok Correct : No
Test #25:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
997 990
output:
No
result:
ok Correct : No
Test #26:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
991 996
output:
No
result:
ok Correct : No
Test #27:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
995 999
output:
No
result:
ok Correct : No
Test #28:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
658 868
output:
No
result:
ok Correct : No
Test #29:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
155 773
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #30:
score: 0
Accepted
time: 1ms
memory: 3908kb
input:
365 605
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #31:
score: 0
Accepted
time: 1ms
memory: 4080kb
input:
491 185
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<^ v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v.v....
result:
ok Correct
Test #32:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
748 562
output:
No
result:
ok Correct : No
Test #33:
score: 0
Accepted
time: 0ms
memory: 3956kb
input:
54 252
output:
No
result:
ok Correct : No
Test #34:
score: 0
Accepted
time: 0ms
memory: 3948kb
input:
889 799
output:
No
result:
ok Correct : No
Test #35:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
504 600
output:
No
result:
ok Correct : No
Test #36:
score: 0
Accepted
time: 1ms
memory: 4288kb
input:
527 701
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #37:
score: 0
Accepted
time: 1ms
memory: 3876kb
input:
195 813
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #38:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
232 402
output:
No
result:
ok Correct : No
Test #39:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
326 313
output:
No
result:
ok Correct : No
Test #40:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
594 628
output:
No
result:
ok Correct : No
Test #41:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
846 977
output:
No
result:
ok Correct : No
Test #42:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
795 894
output:
No
result:
ok Correct : No
Test #43:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
763 660
output:
No
result:
ok Correct : No
Test #44:
score: 0
Accepted
time: 0ms
memory: 3952kb
input:
707 116
output:
No
result:
ok Correct : No
Test #45:
score: 0
Accepted
time: 0ms
memory: 3936kb
input:
555 290
output:
No
result:
ok Correct : No
Test #46:
score: 0
Accepted
time: 1ms
memory: 4436kb
input:
891 597
output:
Yes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<...
result:
ok Correct
Test #47:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
580 807
output:
No
result:
ok Correct : No
Test #48:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
1 1
output:
No
result:
ok Correct : No
Test #49:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
2 1
output:
No
result:
ok Correct : No
Test #50:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
1 3
output:
No
result:
ok Correct : No
Test #51:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
1 4
output:
No
result:
ok Correct : No
Test #52:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
5 1
output:
No
result:
ok Correct : No
Test #53:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
2 2
output:
Yes <^ v>
result:
ok Correct
Test #54:
score: 0
Accepted
time: 0ms
memory: 3932kb
input:
2 3
output:
No
result:
ok Correct : No
Test #55:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
2 4
output:
No
result:
ok Correct : No
Test #56:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
2 5
output:
No
result:
ok Correct : No
Test #57:
score: 0
Accepted
time: 0ms
memory: 3948kb
input:
3 4
output:
No
result:
ok Correct : No
Test #58:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
5 3
output:
No
result:
ok Correct : No
Test #59:
score: 0
Accepted
time: 0ms
memory: 3940kb
input:
5 4
output:
No
result:
ok Correct : No
Test #60:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
5 5
output:
Yes <<<<^ v.v.^ v>.<^ v.^.^ v>>>>
result:
ok Correct
Extra Test:
score: 0
Extra Test Passed