QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#741640 | #7619. Make SYSU Great Again I | Carucao# | WA | 0ms | 3596kb | C++20 | 675b | 2024-11-13 14:52:22 | 2024-11-13 14:52:22 |
Judging History
answer
#include<bits/stdc++.h>
#define endl '\n'
#define int long long
using namespace std;
const int N=1e6+10;
int n,m,k;
void work()
{
cin>>n>>k;
for(int i=1;i<=n;++i)
{
int j=i+1;
if(j==n+1) j=1;
cout<<i<<" "<<i<<endl;
cout<<i<<" "<<j<<endl;
}
if(2*n==k) return;
for(int i=1;i<=n;++i)
{
int u=i,v=i+1;
if(v==n+1) v=1;
for(int j=1;j<=n;++j)
{
if(j==u||j==v) continue;
cout<<i<<" "<<j<<endl;
--k;
if(k==0) return;
}
}
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int T=1;
//cin>>T;
for(;T;--T)
work();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3584kb
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: 3596kb
input:
3 7
output:
1 1 1 2 2 2 2 3 3 3 3 1 1 3 2 1 3 2
result:
wrong output format Extra information in the output file