QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#249671#7619. Make SYSU Great Again Itime_interspace#WA 0ms3944kbC++20538b2023-11-12 13:56:342023-11-12 13:56:34

Judging History

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

  • [2023-11-12 13:56:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3944kb
  • [2023-11-12 13:56:34]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define MAXN 200005
#define mpr make_pair
int n, k;
map<pair<int, int>, int> mp;
int main(){
	cin>>n>>k;
	int cnt = 0;
	for(int i=1;i<n;i++){
		printf("%d %d\n%d %d\n", i, i, i, i+1);
		mp[mpr(i, i)] = mp[mpr(i, i+1)] = 1;
		cnt += 2;
	}
	printf("%d %d\n%d %d\n", n, n, n, n-1);
	mp[mpr(n, n)] = mp[mpr(n, n-1)] = 1;
	cnt += 2;
	for(int i=1;i<=n&&cnt<k;i++) for(int j=1;j<=n&&cnt<k;j++) {
		if(mp[mpr(i, j)]) continue;
		printf("%d %d\n", i, j);
		cnt++;
	}
	return 0;
}

详细

Test #1:

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

input:

3 6

output:

1 1
1 2
2 2
2 3
3 3
3 2

result:

wrong answer The answer is wrong: There are fewer than two numbers in one row or column