結果

問題 No.1934 Four Fruits
ユーザー mnmmnm
提出日時 2022-05-25 22:28:11
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 610 bytes
コンパイル時間 594 ms
コンパイル使用メモリ 73,092 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-20 19:14:50
合計ジャッジ時間 1,200 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>

#define rep(i,n) for(i=0; i<n; ++i)
#define in(a) cin >> a
#define out(a,b) cout << a << b
using namespace std;
using lint = long long;

int main(void){
    int i, j, n, m, k, cnt = 0;
    int a, b, c;
    in(a);
    in(b);
    in(c);
    if(a==b&&a==c)  out(a,endl);
    else if(a==b||a==c||b==c){
        if(a==b)    out(c,endl);
        else if(a==c)   out(b,endl);
        else    out(a,endl);
    }
    else{
        rep(i,4){
            if(a!=i&&b!=i&&c!=i)    out(i,endl);
        }
    }

    return 0;
}

0