#include "bits/stdc++.h"
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define int long long
#define spc " "
#define nd "\n"
#define all(a) a.begin(),a.end()
#define nm 200005
#define rep(b,a) for(int b=0;b<a;b++)
#define REP(b,a) for(int b=1;b<=a;b++)
#define inf 1e18
using namespace std;
void solve(){
int n, m;
cin>>n>>m;
cout<<max(n, m)-1<<nd;
if(n > m){
rep(i, n-1)cout<<-1<<spc;
}
else{
rep(i, m-1)cout<<1<<spc;
}
cout<<nd;
}
int32_t main(){
fast
#ifdef Local
freopen("in","r",stdin);
freopen("out","w",stdout);
#endif
int t;
cin>>t;
while(t--)
solve();
#ifdef Local
cout<<endl<<fixed<<setprecision(2)<<1000.0 * clock() / CLOCKS_PER_SEC<< " milliseconds ";
#endif
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
there is incorrect sequence |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 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 |
212 KB |
there is incorrect sequence |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 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 |
212 KB |
there is incorrect sequence |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
there is incorrect sequence |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
there is incorrect sequence |
2 |
Halted |
0 ms |
0 KB |
- |