QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#793194#9799. Magical PalettekazimiyuukaWA 0ms3668kbC++201.1kb2024-11-29 17:32:292024-11-29 17:32:32

Judging History

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

  • [2024-11-29 17:32:32]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3668kb
  • [2024-11-29 17:32:29]
  • 提交

answer

#include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <random>
#include <cstdlib>
#include <numeric>
#include <functional>
#include <queue>
#include <stdlib.h>
#include <map>
#include <assert.h>
using namespace std;
using ll = long long;
ll mod = 998244353;
void slove() {

    int a, b;
    cin >> a >> b;
    if (gcd(a, b) != 1) {
        cout << "NO\n";
    }
    else {
        cout << "YES\n";
        int s = b == 1 ? 0 : 1;
        for (int i = 1; i <= a; i++ , s += b) {
            cout << s << " ";
        }
        cout << "\n";
        s = a == 1 ? 0 : 1;
        for (int i = 1; i <= b; i++, s += a) {
            cout << s << " ";
        }
        cout << "\n";
    }
}



signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);

    int cnt = 1;
    cin >> cnt;

    while (cnt--) {
        slove();
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
2 3
2 2

output:

YES
1 4 
1 3 5 
NO

result:

wrong answer Token parameter [name=verdict] equals to "YES", doesn't correspond to pattern "Yes|No" (test case 1)