QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#656833 | #7619. Make SYSU Great Again I | DarksideCoder | WA | 0ms | 3936kb | C++20 | 431b | 2024-10-19 13:45:49 | 2024-10-19 13:45:50 |
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[{n,1}]=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: 3936kb
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: 3872kb
input:
3 7
output:
1 1 1 2 2 2 2 3 3 3 3 1 1 3
result:
ok The answer is correct.
Test #3:
score: 0
Accepted
time: 0ms
memory: 3932kb
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: 3932kb
input:
3 9
output:
1 1 1 2 2 2 2 3 3 3 3 1 1 3 1 3 1 3
result:
wrong answer The answer is wrong: Multiple numbers filled in a grid.