QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#793189 | #9799. Magical Palette | kazimiyuuka | WA | 0ms | 3628kb | C++20 | 1.0kb | 2024-11-29 17:31:41 | 2024-11-29 17:31:47 |
Judging History
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)