QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#266341#7619. Make SYSU Great Again Iucup-team073#WA 1ms3372kbC++20489b2023-11-26 13:10:122023-11-26 13:10:13

Judging History

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

  • [2023-11-26 13:10:13]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3372kb
  • [2023-11-26 13:10:12]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long

signed main(){
  int n,k;cin>>n>>k;
  for(int i=1;i<n;++i)cout<<i<<' '<<i<<endl<<i<<' '<<i+1<<endl;
  cout<<n<<' '<<n<<endl;cout<<1<<' '<<n<<endl;
  int curx=1,cury=1;
  for(int i=n*2+1;i<=k;++i){
    while(curx==cury||curx+1==cury||(curx==1&&cury==n)){
      ++cury;
      if(cury==n+1)cury=1,curx++;
    }
    cout<<curx<<' '<<cury<<endl;
    ++cury;
    if(cury==n+1)cury=1,curx++;
  }
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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