#include <bits/stdc++.h>
#define pb push_back
#define LL long long
#define Kultivator ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
const LL Mxn = 1e5 + 7;
const LL Mod = 1e9 + 7;
const LL Inf = 1e14 + 7;
signed main(){
Kultivator;
int tt;
cin >> tt;
while(tt--){
int N, M;
cin >> N >> M;
if(N == M){
cout << N - 1 << '\n';
for(int i = 1; i < N; i++){
cout << true << ' ';
}
}
else if(min(N, M) < 3){
if(N < M){
cout << M - 1 << '\n';
for(int i = 1; i < M; i++){
cout << -1 << ' ';
}
} else {
cout << N - 1 << '\n';
for(int i = 1; i < N; i++){
cout << 1 << ' ';
}
}
}
cout << '\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
Ok |
2 |
Incorrect |
1 ms |
364 KB |
Unexpected end of file - int32 expected |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
364 KB |
Jury has the better answer : jans = 3, pans = 2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
364 KB |
Jury has the better answer : jans = 3, pans = 2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
364 KB |
Jury has the better answer : jans = 3, pans = 2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
Ok |
2 |
Incorrect |
1 ms |
364 KB |
Unexpected end of file - int32 expected |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
Ok |
2 |
Incorrect |
1 ms |
364 KB |
Unexpected end of file - int32 expected |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
364 KB |
Ok |
2 |
Incorrect |
1 ms |
364 KB |
Unexpected end of file - int32 expected |
3 |
Halted |
0 ms |
0 KB |
- |