QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#784502 | #9799. Magical Palette | happy_lazier# | WA | 0ms | 3580kb | C++20 | 580b | 2024-11-26 15:10:51 | 2024-11-26 15:10:53 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,l,r) for(ll i=l;i<=r;++i)
#define rep_(i,r,l) for(ll i=r;i>=l;--i)
const ll N = 2e5 + 7;
const ll P = 1e9 + 7;
ll a0, a1, a2, a3;
void solve() {
int n, m;
cin >> n >> m;
if (gcd(n, m) != 1) {
cout << "No" << endl;
return;
}
rep(i, 1, n) cout << (i - 1) * m + 1 << ' ';
cout << endl;
rep(i, 1, m) cout << (i - 1) * n + 1 << ' ';
cout << endl;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int T(1);
cin >> T;
while (T--) {
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3580kb
input:
2 2 3 2 2
output:
1 4 1 3 5 No
result:
wrong answer Token parameter [name=verdict] equals to "1", doesn't correspond to pattern "Yes|No" (test case 1)