답안 #670515

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
670515 2022-12-09T12:09:35 Z Onur_Ilgaz Nice sequence (IZhO18_sequence) C++17
6 / 100
1 ms 324 KB
#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(m > n){
		rep(i, m-1)cout<<-1<<spc;
	}
	else{
		rep(i, n-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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Ok
2 Correct 1 ms 316 KB Ok
3 Correct 0 ms 324 KB Ok
4 Correct 1 ms 316 KB Ok
5 Correct 1 ms 212 KB Ok
6 Correct 1 ms 316 KB Ok
7 Correct 1 ms 212 KB Ok
8 Correct 1 ms 212 KB Ok
9 Correct 0 ms 212 KB Ok
10 Correct 1 ms 324 KB Ok
11 Correct 1 ms 212 KB Ok
12 Correct 1 ms 212 KB Ok
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Jury has the better answer : jans = 3, pans = 2
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Ok
2 Correct 1 ms 316 KB Ok
3 Correct 0 ms 324 KB Ok
4 Correct 1 ms 316 KB Ok
5 Correct 1 ms 212 KB Ok
6 Correct 1 ms 316 KB Ok
7 Correct 1 ms 212 KB Ok
8 Correct 1 ms 212 KB Ok
9 Correct 0 ms 212 KB Ok
10 Correct 1 ms 324 KB Ok
11 Correct 1 ms 212 KB Ok
12 Correct 1 ms 212 KB Ok
13 Incorrect 1 ms 212 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Ok
2 Correct 1 ms 316 KB Ok
3 Correct 0 ms 324 KB Ok
4 Correct 1 ms 316 KB Ok
5 Correct 1 ms 212 KB Ok
6 Correct 1 ms 316 KB Ok
7 Correct 1 ms 212 KB Ok
8 Correct 1 ms 212 KB Ok
9 Correct 0 ms 212 KB Ok
10 Correct 1 ms 324 KB Ok
11 Correct 1 ms 212 KB Ok
12 Correct 1 ms 212 KB Ok
13 Incorrect 0 ms 212 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Ok
2 Correct 1 ms 316 KB Ok
3 Correct 0 ms 324 KB Ok
4 Correct 1 ms 316 KB Ok
5 Correct 1 ms 212 KB Ok
6 Correct 1 ms 316 KB Ok
7 Correct 1 ms 212 KB Ok
8 Correct 1 ms 212 KB Ok
9 Correct 0 ms 212 KB Ok
10 Correct 1 ms 324 KB Ok
11 Correct 1 ms 212 KB Ok
12 Correct 1 ms 212 KB Ok
13 Incorrect 0 ms 212 KB Jury has the better answer : jans = 3, pans = 2
14 Halted 0 ms 0 KB -