QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#793189#9799. Magical PalettekazimiyuukaWA 0ms3628kbC++201.0kb2024-11-29 17:31:412024-11-29 17:31:47

Judging History

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

  • [2024-11-29 17:31:47]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3628kb
  • [2024-11-29 17:31:41]
  • 提交

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 << " ";
        }
    }
}



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;
}

詳細信息

Test #1:

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

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)