QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#700461#7619. Make SYSU Great Again IArkhellWA 0ms3740kbC++14671b2024-11-02 13:02:132024-11-02 13:02:14

Judging History

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

  • [2024-11-02 13:02:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3740kb
  • [2024-11-02 13:02:13]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long 
using namespace std;
int n,k;
map<pair<int,int>,int>mp;
void solve(){
    cin>>n>>k;
    for(int i=1;i<n;i++){
        cout<<i<<' '<<i<<'\n';
        cout<<i<<' '<<i+1<<'\n';
    }
    cout<<n<<' '<<n<<'\n';
    cout<<n<<' '<<1<<'\n';
    int nowx=1;
    int nowy=3;
    for(int i=2*n+1;i<=k;i++){
        cout<<nowx<<' '<<nowy<<'\n';
        nowy++;
        if(nowx==nowy||nowx+1==nowy){
            nowy++;
        }
        if(nowy>n){
            nowx++;
            nowy=1;
        }
    }
}
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    solve();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3668kb

input:

3 6

output:

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

result:

ok The answer is correct.

Test #2:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

3 7

output:

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

result:

ok The answer is correct.

Test #3:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

2 4

output:

1 1
1 2
2 2
2 1

result:

ok The answer is correct.

Test #4:

score: -100
Wrong Answer
time: 0ms
memory: 3672kb

input:

3 9

output:

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

result:

wrong answer The answer is wrong: Multiple numbers filled in a grid.