QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#783535 | #9799. Magical Palette | Kleaves | WA | 0ms | 3592kb | C++17 | 1.0kb | 2024-11-26 10:26:35 | 2024-11-26 10:26:44 |
Judging History
answer
#pragma GCC optimize(3)
#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define testin freopen("testin1.txt", "r", stdin)
#define testout freopen("testout1.txt", "w", stdout)
#define NO cout<<"No"<<endl
#define YES cout<<"Yes"<<endl
#define MAYBE cout<<"MAYBE"<<endl
#define endl '\n'
#define ALL(x) x.begin(),x.end()
#define INS(x)inserter(x,x.begin())
using namespace std;
const ll MAXN = 1000010;
const ll INF = 0x3f3f3f3f;
const ll mod = 998244353;
bool DEBUG = false;
void solve() {
ll n, m;
cin >> n >> m;
if (gcd(n, m) != 1) {
cout << "No" << endl;
return;
}
cout << "Yes" << endl;
for (int i = 0; i < n; i++) {
cout << n + i << ' ';
}
cout << endl;
for (int i = 0; i < m; i++) {
cout << m + i << ' ';
}
cout << endl;
return;
}
int main() {
//testin;
//freopen("case1out.txt", "w", stdout);
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int t = 1;
cin >> t;
while (t--) {
solve();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3592kb
input:
2 2 3 2 2
output:
Yes 2 3 3 4 5 No
result:
wrong answer Duplicated Color 0 (test case 1)