QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#670154#7619. Make SYSU Great Again IAI80WA 0ms3736kbC++20993b2024-10-23 20:40:142024-10-23 20:40:14

Judging History

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

  • [2024-10-23 20:40:14]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3736kb
  • [2024-10-23 20:40:14]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define lowbit(x) (x & (-x))
typedef long long ll;
typedef pair<int,int> pii;
mt19937 rnd(time(0));
const int N = 5e4 + 7;
const int mod = 1e9 + 9;
void solve() {
    int n , k; cin >> n >> k;
    for(int i = 1;i <= n * 2;i++) {
        if(i & 1) {
            if(((i + 1) / 2) & 1) cout << (i + 1) / 2 << " " << 1 << "\n";
            else cout << (i + 1) / 2 << " " << 2 << "\n";
        }
        else {
            if(((i + 1) / 2) & 1) cout << (i + 1) / 2 << " " << 2 << "\n";
            else cout << (i + 1) / 2 << " " << 1 << "\n";
        }
    }
    k -= n * 2;
    for(int i = 1;i <= n;i++) {
        for(int j = 3;j <= n;j++) {
            if(k) cout << i << " " << j << "\n",k--;
            else break;
        }
        if(!k) break;
    }
}
signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t = 1;
    // cin >> t;
    while(t--) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3736kb

input:

3 6

output:

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

result:

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