QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#252052#7619. Make SYSU Great Again Iucup-team1074WA 0ms3576kbC++17818b2023-11-15 15:13:142023-11-15 15:13:14

Judging History

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

  • [2023-11-15 15:13:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3576kb
  • [2023-11-15 15:13:14]
  • 提交

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+1<<endl;
    }
    int x=1,y=1;
    for(int i=2*n;i<=k;i++)
    {
        if(x==y) y+=2;
        if(y>n){
            y=1;
            x++;
        }
        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: 3576kb

input:

3 6

output:

1 1
1 2
2 2
2 3
3 3
1 3

result:

wrong answer The answer is wrong: There are fewer than two numbers in one row or column