QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#676237#7619. Make SYSU Great Again IxcyyyyyWA 0ms3796kbC++20579b2024-10-25 20:45:322024-10-25 20:45:32

Judging History

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

  • [2024-10-25 20:45:32]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3796kb
  • [2024-10-25 20:45:32]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define N 1000005
#define fr first
#define se second
#define ls u<<1
#define rs u<<1|1
#define M 10000005
#define p 998244353
#define pb push_back
#define ll long long
#define inf 0x3f3f3f3f
#define pii pair<int,int>
int n,k,x=1,y=1;
void findnxt(){
	++y;
	if(y==n+1)++x,y=1;
	if(y==x||y==x%n+1)findnxt();
}
int main(){
	scanf("%d%d",&n,&k);
	for(int i=1;i<=k;i++){
		if(i<=2*n){
			if(i&1)printf("%d %d\n",i/2+1,i/2+1);
			else printf("%d %d\n",i/2,i/2+1);
		}
		else findnxt(),printf("%d %d\n",x,y);
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 6

output:

1 1
1 2
2 2
2 3
3 3
3 4

result:

wrong answer Integer 4 violates the range [1, 3]