QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#790064 | #9799. Magical Palette | wifi32767 | WA | 0ms | 3712kb | C++20 | 734b | 2024-11-28 00:21:00 | 2024-11-28 00:21:00 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// #define int ll
#define endl '\n'
const int MAX = 5e5 + 5, mod = 1e9 + 7;
void solve(){
int n, m;
cin >> n >> m;
if (n == 1){
cout << "Yes\n1\n";
}
else if (m == 1){
cout << "Yes\n";
for (int i = 0; i < n; i++){
cout << i << " ";
}
cout << endl;
}
else if (n == 2 and m == 3){
cout << "Yes\n1 2\n1 3 5\n";
}
else if (n == 3 and m == 2){
cout << "Yes\n1 3 5\n1 2\n";
}
else{
cout << "No\n";
}
}
signed main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int T=1;cin>>T;while(T--)
solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3712kb
input:
2 2 3 2 2
output:
Yes 1 2 1 3 5 No
result:
ok 2 cases (2 test cases)
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3584kb
input:
1 1 1000000
output:
Yes 1
result:
wrong output format Unexpected end of file - int32 expected (test case 1)