QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#252065#7619. Make SYSU Great Again Iucup-team1074WA 0ms3612kbC++17852b2023-11-15 15:21:542023-11-15 15:21:55

Judging History

你现在查看的是最新测评结果

  • [2023-11-15 15:21:55]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3612kb
  • [2023-11-15 15:21:54]
  • 提交

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]