結果

問題 No.570 3人兄弟(その1)
ユーザー sotanakajimacl1sotanakajimacl1
提出日時 2017-10-06 22:28:56
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 1,324 ms
コンパイル使用メモリ 160,880 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-28 10:40:26
合計ジャッジ時間 1,589 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int a[3],b[3];
int main(){
    cin>>a[0]>>a[1]>>a[2];
    b[0]=a[1];b[1]=a[1];b[2]=a[2];
    sort(b,b+3);
    if(b[2]==a[0]) cout<<"A"<<endl;
    else if(b[2]==a[1]) cout<<"B"<<endl;
    else if(b[2]==a[2]) cout<<"C"<<endl;
    if(b[1]==a[0]) cout<<"A"<<endl;
    else if(b[1]==a[1]) cout<<"B"<<endl;
    else if(b[1]==a[2]) cout<<"C"<<endl;
    if(b[0]==a[0]) cout<<"A"<<endl;
    else if(b[0]==a[1]) cout<<"B"<<endl;
    else if(b[0]==a[2]) cout<<"C"<<endl;
    return 0;
}
0