QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#142097#5575. Knight's Tour Reduxammardab3an#WA 1ms3496kbC++17719b2023-08-18 14:21:452023-08-18 14:21:48

Judging History

This is the latest submission verdict.

  • [2023-08-18 14:21:48]
  • Judged
  • Verdict: WA
  • Time: 1ms
  • Memory: 3496kb
  • [2023-08-18 14:21:45]
  • Submitted

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)