結果
| 問題 | No.1934 Four Fruits |
| コンテスト | |
| ユーザー |
piyopiyonamako
|
| 提出日時 | 2022-05-13 22:06:38 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,969 bytes |
| 記録 | |
| コンパイル時間 | 1,482 ms |
| コンパイル使用メモリ | 168,768 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 02:00:09 |
| 合計ジャッジ時間 | 1,993 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#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
}
piyopiyonamako