QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#656814 | #7619. Make SYSU Great Again I | DarksideCoder | WA | 1ms | 3960kb | C++20 | 431b | 2024-10-19 13:43:54 | 2024-10-19 13:44:00 |
Judging History
answer
#include<bits/stdc++.h>
std::map<std::pair<int,int>,bool>M;
int n,k;
int main(){
scanf("%d%d",&n,&k);
int x=1,y=1;
for(int i=1;i<n*2;i++){
printf("%d %d\n",x,y);
M[{x,y}]=true;
if(i%2==1)y++;
else x++;
}
printf("%d %d\n",n,1);
M[{1,n}]=true;
x=1,y=1;
for(int i=2*n+1;i<=k;i++){
while(M.find({x,y})!=M.end()){
y++;
if(y==n+1){x++,y=1;}
}
printf("%d %d\n",x,y);
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3916kb
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: 3912kb
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: 3780kb
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: 1ms
memory: 3960kb
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.