QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#180639 | #6677. Puzzle: Sashigane | rgnerdplayer | WA | 0ms | 3584kb | C++20 | 1021b | 2023-09-16 03:12:35 | 2023-09-16 03:12:36 |
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 (U < x && L < y) {
cout << U << ' ' << L << ' ' << D - U << ' ' << R - L << '\n';
L++, U++;
}
while (x < D && L < y) {
cout << D << ' ' << L << ' ' << U - D << ' ' << R - L << '\n';
L++, D--;
}
while (U < x && y < R) {
cout << U << ' ' << R << ' ' << D - U << ' ' << L - R << '\n';
R--, U++;
}
while (x < D && y < R) {
cout << D << ' ' << R << ' ' << U - D << ' ' << L - R << '\n';
R--, D--;
}
};
solve();
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3584kb
input:
5 3 4
output:
Yes 1 1 4 4 2 2 3 3 5 3 -2 2 4 5 -1 -1
result:
wrong answer L shape #1 out of bounds. (test case 1)