QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#783051 | #9799. Magical Palette | yzy_21 | Compile Error | / | / | C++17 | 1.0kb | 2024-11-25 22:49:42 | 2024-11-25 22:49:43 |
Judging History
This is the latest submission verdict.
- [2024-11-25 22:49:43]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-11-25 22:49:42]
- Submitted
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t;cin >> t;
while(t--) {
int n, m;cin >> n >> m;
if(n == 0 or b == 0) {
cout << "No\n";
continue;
}
if(n == 1) {
cout << "Yes\n";
cout << "1\n";
for(int i = 1; i < m; ++i) {
cout << i << " ";
}
cout << "0\n";
}
else if(m == 1) {
cout << "Yes\n";
for(int i = 1; i < n; ++i) cout << i << " ";
cout << "0\n1\n";
}
else if(gcd(n, m) == 1) {
cout << "Yes\n";
for(int i = 1; i <= n; ++i) {
cout << 1 + (i - 1) * m << " ";
}
cout << "\n";
for(int i = 1; i <= m; ++i) {
cout << 1 + (i - 1) * n << " ";
}
cout << "\n";
}
else cout << "No\n";
}
return 0;
}
Details
answer.code: In function ‘int main()’: answer.code:11:22: error: ‘b’ was not declared in this scope 11 | if(n == 0 or b == 0) { | ^