結果

問題 No.1893 Cycle
ユーザー BanetteGinBanetteGin
提出日時 2022-04-12 23:12:23
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,191 bytes
コンパイル時間 1,449 ms
コンパイル使用メモリ 163,612 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-23 08:43:29
合計ジャッジ時間 2,584 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

#define rep(i, n) for(int i = 0, n_f = (int)(n); i < n_f; ++i)
#define rrep(i, n) for(int i = 1, n_f = (int)(n); i <= n_f; ++i)
#define rrrep(i, a, n, p) for(int i = (int)(a), n_f = (int)(n), p_f = (int)(p); i <= n_f; i+=p_f)
#define repd(i, n) for(int i = (int)(n), n_f = 0; i >= n_f; --i)
#define all(a) (a).begin(),(a).end()
#define pb(a) push_back(a)
#define eb(a) emplace_back(a)
#define mpa(a,b) make_pair(a,b)
#define YES(a) if(a){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define Yes(a) if(a){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}

typedef long long int ll;
typedef double dou;
typedef long double ld;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<string> vstr;
typedef vector<bool> vbol;
typedef vector<vector<bool>> vvbol;
typedef vector<dou> vdou;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<pair<int,int>> vpint;

const int dx[] = {-1,0,1,0};
const int dy[] = {0,1,0,-1};
const int mod99 = 998244353;
const int mod107 = 1000000007;
const ll mod99ll = 998244353LL;
const ll mod107ll = 1000000007LL;
const int INF = 1000000000;
const ll INFll = 1000000000000000000LL;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
template<class T>T permu(const T &n,const T &m) {T ret=1;for(T i=n;i>m;--i)ret*=i;return ret;}
template<class T>T conbi(const T &n,const T &m) {return permu(n,m)/permu(m,2);}
template<class T>T homog(const T &n,const T &m) {return conbi(n+m-1,m);}
template<class T>T ppow(T a,T n) {T ret=(T)1;while(n>0){if(n&(T)1)ret=ret*a;a=a*a;n>>=(T)1;}return ret;}
template<class T>T mod_pow(T &a,T &n,const T &mod) {T ret=(T)1;while(n>0){if(n&(T)1)ret=ret*a%mod;a=a*a%mod;n>>=(T)1;}return ret;}
template<class T>T mod_inv(const T &a,const T &mod) {return modpow(a,mod-(T)2,mod);}
template<class T> T gcd(T n,T m){if(max(n,m)%min(n,m)==(T)0) return min(n,m);return gcd(min(n,m),(max(n,m)%min(n,m)));}

int main(void){
    int x,y;
    cin>>x>>y;
    if(x>y) swap(x,y);
    if((y+4)%12!=x)cout<<(y+4)%12<<endl;
    else cout<<x+4<<endl;
}
0