QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#283121#7619. Make SYSU Great Again IEvierWA 0ms3644kbC++14383b2023-12-13 21:13:582023-12-13 21:13:58

Judging History

This is the latest submission verdict.

  • [2023-12-13 21:13:58]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3644kb
  • [2023-12-13 21:13:58]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
int n,k;
int main(){
	cin>>n>>k;
	for(int i=1;i<n;i++){
		cout<<i<<" "<<i<<"\n";
		cout<<i<<" "<<i+1<<"\n";
	}
	cout<<n<<" "<<n<<"\n";
	cout<<n<<" 1"<<"\n";
	int px=1,py=3;
	for(int i=2*n+1;i<=k;i++){
		if(py>=n)++px,py=1;
		while((px==n&&(py==1||py==n))||(px!=n&&(py==px||py==px+1)))++py;
		cout<<px<<" "<<py<<"\n";
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3644kb

input:

3 6

output:

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

result:

ok The answer is correct.

Test #2:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

3 7

output:

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

result:

ok The answer is correct.

Test #3:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2 4

output:

1 1
1 2
2 2
2 1

result:

ok The answer is correct.

Test #4:

score: -100
Wrong Answer
time: 0ms
memory: 3616kb

input:

3 9

output:

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

result:

wrong answer The answer is wrong: Multiple numbers filled in a grid.