結果

問題 No.1934 Four Fruits
ユーザー wanuiwanui
提出日時 2022-05-13 21:27:47
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,250 bytes
コンパイル時間 1,433 ms
コンパイル使用メモリ 172,084 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-29 06:27:14
合計ジャッジ時間 2,379 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
// clang-format off
using namespace std; using ll=long long; using ull=unsigned long long; using pll=pair<ll,ll>; const ll INF=4e18;
void print0(){}; template<typename H,typename... T> void print0(H h,T... t){cout<<h;print0(t...);}
void print(){print0("\n");}; template<typename H,typename... T>void print(H h,T... t){print0(h);if(sizeof...(T)>0)print0(" ");print(t...);}
void perr0(){}; template<typename H,typename... T> void perr0(H h,T... t){cerr<<h;perr0(t...);}
void perr(){perr0("\n");}; template<typename H,typename... T>void perr(H h,T... t){perr0(h);if(sizeof...(T)>0)perr0(" ");perr(t...);}
void ioinit() { cout<<fixed<<setprecision(15); cerr<<fixed<<setprecision(6); ios_base::sync_with_stdio(0); cin.tie(0); }
// clang-format on

int main() {
    ioinit();
    ll A, B, C;
    cin >> A >> B >> C;
    if (A == B && B == C) {
        print(A);
        return 0;
    }
    if (A == B) {
        print(C);
        return 0;
    }
    if (B == C) {
        print(A);
        return 0;
    }
    if (A == C) {
        print(B);
        return 0;
    }
    set<ll> st;
    st.insert(0);
    st.insert(1);
    st.insert(2);
    st.insert(3);
    st.erase(A);
    st.erase(B);
    st.erase(C);
    print(*st.begin());
}
0