結果
問題 |
No.3162 Five Two Three
|
ユーザー |
![]() |
提出日時 | 2025-05-23 20:24:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 676 bytes |
コンパイル時間 | 3,584 ms |
コンパイル使用メモリ | 251,296 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-05-23 20:24:49 |
合計ジャッジ時間 | 24,486 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 RE * 1 |
other | AC * 30 WA * 10 RE * 147 |
ソースコード
#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; } assert(false); cout<<-1<<endl; return 0; }