QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#790092 | #9799. Magical Palette | wifi32767 | WA | 0ms | 3568kb | C++20 | 607b | 2024-11-28 00:52:00 | 2024-11-28 00:52:06 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// #define int ll
#define endl '\n'
#define yes cout << "Yes" << endl
#define no cout << "No" << endl
const int MAX = 5e5 + 5, mod = 1e9 + 7;
void solve(){
int n, m; cin >> n >> m;
if (gcd(n, m) != 1){
no;return;
}
yes;
for (int i = 0; i < n; i ++) cout << i * m + 1 << ' ';
cout << endl;
for (int i = 0; i < m; i ++) cout << i * n + 1 << ' ';
cout << endl;
}
signed main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
// int T=1;cin>>T;while(T--)
solve();
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3568kb
input:
2 2 3 2 2
output:
No
result:
wrong answer Wrong Verdict (test case 1)