QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#689486#7619. Make SYSU Great Again Illlei#WA 1ms3584kbC++20503b2024-10-30 17:20:392024-10-30 17:20:39

Judging History

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

  • [2024-10-30 17:20:39]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3584kb
  • [2024-10-30 17:20:39]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n,k;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin>>n>>k;
    int flag=0,x=1,y=1;
    for(int i=1;i<=2*n-1;i++)
    {
        cout<<x<<" "<<y<<'\n';
        if(flag==0)x++;
        else y++;
        flag^=1;
    }
    k-=2*n-1;
    for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++)
    {
        if(i==j||i-1==j)continue;
        cout<<i<<" "<<j<<'\n';
        k--;
        if(k==0)break;
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3584kb

input:

3 6

output:

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

result:

wrong answer The answer is wrong: The maximum common divisor of row 3 and column 1679168640 is not the same.