結果
| 問題 |
No.1934 Four Fruits
|
| コンテスト | |
| ユーザー |
momotaro1303
|
| 提出日時 | 2022-06-06 00:01:40 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 2,240 bytes |
| コンパイル時間 | 2,351 ms |
| コンパイル使用メモリ | 213,584 KB |
| 最終ジャッジ日時 | 2025-01-29 18:39:07 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> PP;
typedef tuple<ll,ll,ll> TTT;
const ll mod=1e9+7,INF=mod*mod*3;
//M_PI 998244353
#define rep(i,N) for(ll i=0; i<(N); i++)
#define rep1(i,N) for(ll i=1; i<(N); i++)
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define si(x) x.size()
#define debug(x,y) cout<<x<<" "<<y<<endl;
#define add(x,y) (x=(x+y)%mod)
#define sub(x,y) (x=(x-y+mod)%mod)
#define mult(x,y) (x=(x*y)%mod)
template<class T>
inline bool chmax(T &a,const T &b){
if(a<b) {a=b;return 1;}
return 0;
}
template<class T>
inline bool chmin(T &a,const T &b){
if(b<a) {a=b;return 1;}
return 0;
}
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
fill( (T*)array, (T*)(array+N), val );
}
// a + b がオーバーフローするならtrueを返す
template <class T> bool overflow_if_add(T a, T b) {
return (std::numeric_limits<T>::max() - a) < b;
}
// a * b がオーバーフローするならtrueを返す
template <class T> bool overflow_if_mul(T a, T b) {
return (std::numeric_limits<T>::max() / a) < b;
}
ll mod_inverse(ll a) {
ll ret=1L;
ll m=1e9+5L;
while(m){
if(m%2){
ret=(ret*a)%mod;
}
m=m/2;
a=(a*a)%mod;
}
return ret;
}
const ll sze=2000005;
ll fc[sze],fv[sze];
ll cb(ll n,ll r){
ll ret=0;
ret=fc[n]*fv[n-r]%mod*fv[r]%mod;
return ret;
}
ll pw(ll x,ll y){
ll ret=1;
for(ll i=0; i<y; i++) ret=ret*x;
return ret;
}
ll ctoi(char c) {
if(c>='0'&&c<='9'){
return c-'0';
}
return 0;
}
ll gcd(ll a,ll b){
if(a<b) swap(a,b);
if(a%b==0) return b;
else return gcd(a%b,b);
}
#ifdef LOCAL
#define DBG(X,Y) debug(X,Y);
#define SAY(X) cout<<(X)<<endl;
#else
#define DBG(X,Y)
#define SAY(X)
#endif
ll a,b,c;
void slv(){
cin>>a>>b>>c;
if(a==b&&b==c){
cout<<a<<endl;
}
else if(a!=b&&a!=c&&b!=c){
cout<<6-(a+b+c)<<endl;
}
else{
if(a==b) cout<<c<<endl;
if(a==c) cout<<b<<endl;
if(b==c) cout<<a<<endl;
}
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
//ll t;cin>>t;rep(_,t)
slv();
}
momotaro1303