結果

問題 No.1934 Four Fruits
ユーザー shojin
提出日時 2024-05-08 21:21:39
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 4,749 ms
コンパイル使用メモリ 278,604 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-15 04:53:44
合計ジャッジ時間 4,907 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
  int a, b, c;
  cin >> a >> b >> c;
  
  map<int, int> mp;
  mp[a]++, mp[b]++, mp[c]++;
  
  if(mp.size() == 1) cout << a;
  else if(mp.size() == 2){
    for(int i = 0; i < 4; i++) if(mp[i] == 1) cout << i;
  }
  else{
    for(int i = 0; i < 4; i++) if(mp[i] == 0) cout << i;
  }
}
0