QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#782845 | #9799. Magical Palette | yzy_21 | Compile Error | / | / | C++14 | 600b | 2024-11-25 21:47:31 | 2024-11-25 21:47:39 |
Judging History
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(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;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:11:12: error: ‘gcd’ was not declared in this scope 11 | if(gcd(n, m) == 1) { | ^~~