QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#784502#9799. Magical Palettehappy_lazier#WA 0ms3580kbC++20580b2024-11-26 15:10:512024-11-26 15:10:53

Judging History

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

  • [2024-11-26 15:10:53]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3580kb
  • [2024-11-26 15:10:51]
  • 提交

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;
}

详细

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)