QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#142097 | #5575. Knight's Tour Redux | ammardab3an# | WA | 1ms | 3496kb | C++17 | 719b | 2023-08-18 14:21:45 | 2023-08-18 14:21:48 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
vector<pair<int, int>>vv = { {1,1},{4,2},{3,7},{6,6},{7,3},{4,2},{5,5}};
if (n == 7) {
cout << "POSSIBLE" << endl;
for (auto x : vv)cout << x.first << " " << x.second << '\n';
return 0;
}
if (n == 1) {
cout << "POSSIBLE" << endl;
cout << "1 1" << endl;
}
else {
if (n % 10) {
cout << "IMPOSSIBLE" << endl;
}
else {
vector<pair<int, int>>v = { {1,1},{4,2},{3,5},{2,8},{5,9},{6,6},{7,3},{10,4},{9,7},{8,10} };
cout << "POSSIBLE" << endl;
for (int i = 0; i < n; i += 10) {
for (auto x : v) {
cout << x.first + i << " " << x.second + i << '\n';
}
}
}
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 3472kb
input:
1
output:
POSSIBLE 1 1
result:
ok answer = 1
Test #2:
score: 0
Accepted
time: 1ms
memory: 3484kb
input:
2
output:
IMPOSSIBLE
result:
ok answer = 0
Test #3:
score: 0
Accepted
time: 1ms
memory: 3436kb
input:
3
output:
IMPOSSIBLE
result:
ok answer = 0
Test #4:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
4
output:
IMPOSSIBLE
result:
ok answer = 0
Test #5:
score: -100
Wrong Answer
time: 1ms
memory: 3440kb
input:
5
output:
IMPOSSIBLE
result:
wrong answer jury has the better answer: jans = 1, pans = 0 (1 is Possible)