QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#180638 | #6677. Puzzle: Sashigane | rgnerdplayer | WA | 0ms | 3568kb | C++20 | 1021b | 2023-09-16 03:11:06 | 2023-09-16 03:11:07 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
#ifdef LOCAL
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
auto solve = [&]() {
int n, x, y;
cin >> n >> x >> y;
cout << "Yes\n";
int L = 1, R = n, U = 1, D = n;
while (L < x && U < y) {
cout << U << ' ' << L << ' ' << D - U << ' ' << R - L << '\n';
L++, U++;
}
while (L < x && y < D) {
cout << D << ' ' << L << ' ' << U - D << ' ' << R - L << '\n';
L++, D--;
}
while (x < R && U < y) {
cout << U << ' ' << R << ' ' << D - U << ' ' << L - R << '\n';
R--, U++;
}
while (x < R && y < D) {
cout << D << ' ' << R << ' ' << U - D << ' ' << L - R << '\n';
R--, D--;
}
};
solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3568kb
input:
5 3 4
output:
Yes 1 1 4 4 2 2 3 3 3 5 2 -2 5 4 -1 -1
result:
wrong answer L shape #1 out of bounds. (test case 1)