QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#609565#8934. Challenge NPCucup-team4975#WA 0ms3812kbC++23754b2024-10-04 13:26:542024-10-04 13:26:55

Judging History

你现在查看的是最新测评结果

  • [2024-10-04 13:26:55]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3812kb
  • [2024-10-04 13:26:54]
  • 提交

answer

#include <bits/stdc++.h>
#define fir first
#define sec second
#define el '\n'
using namespace std;
using PII = pair<int, int>;
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int k;
	cin >> k;
	int cnt = 0;
	vector<PII> ans;
	for (int i = 1; i <= (k + 2) * 2; i += 2) {
		for (int j = 2; j < i; j += 2) {
			ans.push_back(PII(i, j));
		}
	}
	for (int i = 2; i <= (k + 2) * 2; i += 2) {
		for (int j = 1; j < i; j += 2) {
			ans.push_back(PII(i, j));
		}
	}
	cout << (k + 2) * 2 << " " << ans.size() << " " << "2" << endl;
	for (int i = 1; i <= (k + 2) * 2; i++) {
		cout << i % 2 + 1 << " ";
	}
	cout << endl;
	for (int i = 0; i < ans.size(); i++) {
		cout << ans[i].fir << " " << ans[i].sec << endl;
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3812kb

input:

1

output:

6 9 2
2 1 2 1 2 1 
3 2
5 2
5 4
2 1
4 1
4 3
6 1
6 3
6 5

result:

wrong answer The graph is not correct