QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#252065 | #7619. Make SYSU Great Again I | ucup-team1074 | WA | 0ms | 3612kb | C++17 | 852b | 2023-11-15 15:21:54 | 2023-11-15 15:21:55 |
Judging History
answer
#include<iostream>
#include<math.h>
#include<vector>
#include<unordered_map>
#include<algorithm>
#include<queue>
#include<string.h>
#define ll long long
using namespace std;
void solve()
{
int n,k;
cin>>n>>k;
for(int i=1;i<=2*n;i++)
{
if(i%2==0)
cout<<i/2<<" "<<i/2+1<<endl;
else
cout<<i/2+1<<" "<<(i/2)%n+1<<endl;
}
int x=1,y=1;
for(int i=2*n+1;i<=k;i++)
{
if(x==y) y+=2;
if(y>n){
y=1;
x++;
if(x==n) y=2;
}
cout<<x<<" "<<y<<endl;
y++;
}
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout.precision(10);
int t;
t=1;
while(t>0)
{
t--;
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3612kb
input:
3 6
output:
1 1 1 2 2 2 2 3 3 3 3 4
result:
wrong answer Integer 4 violates the range [1, 3]