結果

問題 No.1934 Four Fruits
ユーザー piyopiyonamakopiyopiyonamako
提出日時 2022-05-13 22:06:38
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,969 bytes
コンパイル時間 1,552 ms
コンパイル使用メモリ 165,052 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-29 07:24:32
合計ジャッジ時間 2,515 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string st ;
typedef long double ld ;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl ;
typedef tuple<int,int,int>  ti ;
typedef tuple<ll,ll,ll> tl ;
typedef vector<vector<int>> vi ;
typedef vector<vector<ll>> vl ;
typedef vector<vector<bool>> vb ;
typedef vector<vector<st>> vs ;
typedef vector<vector<char>> vc;
const ll mod0 = 1000000007;
const ll mod1 = 998244353 ;
const ll LINF = (1LL << 60);
const int INF = (1 << 30);


#define pb                push_back
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define all(x)            x.begin(), x.end()
#define rep(i,a,n)        for (ll i = a; i <= (n); ++i)
#define f                 first
#define s                 second
#define re                return 0;
#define fore(i,a)         for(auto &i:a)


ll gcd(ll a, ll b){
 
   if(b == 0){
    return a;
}
return gcd(b,a%b) ;
}


ll lcm(ll a, ll b){
    
    ll ans = a*b /gcd(a,b) ;
    return ans ;
}

bool nis(ll q){
    
     // 素数だったらtrue ,素数じゃなかったらfalse
     
       if(q == 1){
           
           return false ;
       }
       
      for(ll i=2;i*i <=q;i++){
          if(q%i == 0){
              return false ;
          }
      }
    return true ;
}





ll digit_sum(ll a){
  
    ll sum = 0;
    while(a > 0){
       sum += a%10 ;
       a /= 10 ;
    }
  return sum ;
}


#define  C            cout   
#define  E            endl;

const ll dx[4] = { 1, 0, -1, 0 };
const ll dy[4] = { 0, 1, 0, -1 };

// ↑↑↑ 型が	ll であることに注意 !!!!
 
 st Y = "Yes" ; 
 st YY = "No" ;


int main(void){

ll a,b,c ;
cin>>a>>b>>c ;

if(a == b && b == c){
	C << a << E
}else if(a != b && b != c && a != c){
	
	rep(i,0,3){
		
		 if(a != i){
		 	if(b != i){
		 		if(c != i){
		 			
		 			C << i << E
		 			re
		 		}
		 	}
		 }
	}
	
}else{
	
	C << (a^b^c) << E
}

  
re

}
0