QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#790092#9799. Magical Palettewifi32767WA 0ms3568kbC++20607b2024-11-28 00:52:002024-11-28 00:52:06

Judging History

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

  • [2024-11-28 00:52:06]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3568kb
  • [2024-11-28 00:52:00]
  • 提交

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)