QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#656551 | #7619. Make SYSU Great Again I | yld | WA | 0ms | 3624kb | C++20 | 848b | 2024-10-19 13:18:43 | 2024-10-19 13:18:49 |
Judging History
answer
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
void solve()
{
int n,k;
cin>>n>>k;
int cnt=1;
for(int i=1,j=1;i<=n && j<=n;)
{
cnt++;
cout<<i<<' '<<j<<endl;
if(cnt%2) i++;
else j++;
}
cout<<n<<' '<<1<<endl;
cnt++;
for(int i=1;i<=n && cnt<=k;i++)
{
for(int j=1;j<=n;j++)
{
if(i!=n)
{
cnt++;
if(j==i+1 || j==i) continue;
cout<<i<<' '<<j<<endl;
}
else
{
cnt++;
if(j==1 || j==n) continue;
cout<<i<<' '<<j<<endl;
}
}
}
}
signed main()
{
cin.tie(0)->sync_with_stdio(0);
int t=1;
while(t--) solve();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3604kb
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: 3624kb
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: 3548kb
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: 3608kb
input:
3 9
output:
1 1 1 2 2 2 2 3 3 3 3 1 1 3
result:
wrong output format Unexpected end of file - int32 expected