結果

問題 No.1934 Four Fruits
ユーザー abap34abap34
提出日時 2022-05-13 21:31:04
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 693 bytes
コンパイル時間 3,744 ms
コンパイル使用メモリ 227,340 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-29 06:30:59
合計ジャッジ時間 4,428 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 RE -
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(a)  (a).begin(),(a).end()

int main(){
    vector<int> A(3);
    cin >> A[0] >> A[1] >> A[2];
    sort(ALL(A));
    if (A[0] == A[2]){
        cout << A[0] << endl;
    } else {
        if ((A[0] == A[1]) || (A[1] == A[2])){
            if (A[0] == A[1]){
                cout << A[2] << endl;
            } else {
                cout << A[0] << endl;
            }
        } else {
            rep(i, 4){
                if (A[i] != i){
                    cout << i << endl;
                    return 0;
                }
            }
        } 

    }
}
0