QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#293927#5255. Greedy DrawersLaStataleBlue#WA 1ms3724kbC++17758b2023-12-29 23:20:142023-12-29 23:20:15

Judging History

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

  • [2023-12-29 23:20:15]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3724kb
  • [2023-12-29 23:20:14]
  • 提交

answer

#include <cstdio>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
constexpr int MAXN = 100'005;

int main()
{
	int n;
	scanf("%d", &n);
	vector<pii> bo, dr;

	constexpr int S = 1001;
	int w = 1;
	for (int i = 0; i < n / 3; i++)
	{
		bo.push_back({w, S - w - 1});
		bo.push_back({w, S - w - 2});
		bo.push_back({w + 1, S - w - 2});
		dr.push_back({w, S - w});
		dr.push_back({w + 1, S - w - 1});
		dr.push_back({w + 2, S - w - 2});
		w += 3;
	}

	for (int i = 0; i < n % 3; i++)
	{
		bo.push_back({w, S - w});
		dr.push_back({w, S - w});
	}

	for (const pii &b : bo)
		printf("%d %d\n", b.first, b.second);
	printf("\n");
	for (const pii &d : dr)
		printf("%d %d\n", d.first, d.second);
	return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3724kb

input:

150

output:

1 999
1 998
2 998
4 996
4 995
5 995
7 993
7 992
8 992
10 990
10 989
11 989
13 987
13 986
14 986
16 984
16 983
17 983
19 981
19 980
20 980
22 978
22 977
23 977
25 975
25 974
26 974
28 972
28 971
29 971
31 969
31 968
32 968
34 966
34 965
35 965
37 963
37 962
38 962
40 960
40 959
41 959
43 957
43 956
4...

result:

wrong answer Janko passed your test!