結果

問題 No.3162 Five Two Three
ユーザー 沙耶花
提出日時 2025-05-23 20:23:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 660 bytes
コンパイル時間 3,856 ms
コンパイル使用メモリ 251,976 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-05-23 20:24:10
合計ジャッジ時間 10,286 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 74 WA * 113
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000005
#define Inf64 4000000000000000001LL

int main(){
	long long x,y,z;
	cin>>x>>y>>z;
	if(abs(x-y)==z){
		cout<<3<<endl;
		cout<<x<<' '<<z<<' '<<y<<endl;
		return 0;
	}
	if(x==y){
		cout<<4<<endl;
		cout<<x<<' '<<z<<' '<<z<<' '<<y<<endl;
		return 0;
	}
	
	if(z*2==x+y){
		cout<<4<<endl;
		if(z-x>=0){
			cout<<x<<' '<<z-x<<' '<<z<<' '<<y<<endl;
		}
		else{
			cout<<x<<' '<<z<<' '<<z-y<<' '<<y<<endl;
		}
		return 0;
	}
	cout<<-1<<endl;
	return 0;
}
0