結果
| 問題 |
No.1257 変わった平均値
|
| コンテスト | |
| ユーザー |
mot
|
| 提出日時 | 2020-10-17 03:37:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,262 bytes |
| コンパイル時間 | 1,318 ms |
| コンパイル使用メモリ | 87,440 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-21 01:46:46 |
| 合計ジャッジ時間 | 2,155 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 WA * 5 |
ソースコード
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pqueue priority_queue
const int inf=1e9+7;
const ll mod=1e9+7;
const ll mod1=998244353;
const ll big=1e18;
const double PI=2*asin(1);
int main() {
int A, B, C, D, E, F;
cin>>A>>B>>C>>D>>E>>F;
if(A==D && B==E && C==F) {
cout<<"Yes"<<endl;
cout<<"2 A"<<endl;
cout<<"2 A"<<endl;
return 0;
}
vector<int> arr1(3), arr2(3);
arr1[0] = A;
arr1[1] = B;
arr1[2] = C;
arr2[0] = D;
arr2[1] = E;
arr2[2] = F;
sort(arr1.begin(), arr1.end());
sort(arr2.begin(), arr2.end());
bool ok = true;
for(int i=0;i<3;++i) {
if(arr1[i]!=arr2[i]) ok = false;
}
if(!ok) {
cout<<"No"<<endl;
return 0;
}
cout<<"Yes"<<endl;
if(A==D) {
cout<<"2 A"<<endl;
}
else if(B==E) {
cout<<"2 B"<<endl;
}
else if(C==F) {
cout<<"2 C"<<endl;
}
else {
cout<<"2 A"<<endl;
swap(B, C);
if(B==E) {
cout<<"2 B"<<endl;
}
else {
cout<<"2 C"<<endl;
}
}
}
mot