QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#356478 | #7619. Make SYSU Great Again I | 11d10xy | WA | 0ms | 3836kb | C++17 | 401b | 2024-03-17 20:55:00 | 2024-03-17 20:55:01 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n,k;
pair<int,int>ans[200010];
int main(){
cin>>n>>k;
for(int i=1;i<=n;i++)ans[i*2-1]={i,i};
for(int i=1;i<n;i++)ans[i*2]={i,i+1};
ans[n*2]={n,1};
for(int i=n*2+1,x=1,y=1;i<=k;y++,y>n&&(y=1,x++))
if(y!=x+1&&!(x==n&&y==1))ans[i++]={x,y};
for(int i=1;i<=k;i++)printf("%d %d\n",ans[i].first,ans[i].second);
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3836kb
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: -100
Wrong Answer
time: 0ms
memory: 3832kb
input:
3 7
output:
1 1 1 2 2 2 2 3 3 3 3 1 1 1
result:
wrong answer The answer is wrong: Multiple numbers filled in a grid.