結果

提出番号 1509
提出者 hamayanhamayan
言語 C++
提出日時 2018-08-04 13:06:01
問題名 (67)575ゲーム
結果 AC
点数 100%

テストケース

テストケース 結果 得点 実行時間 メモリ使用量
1 AC 100% 2ms 7840KB
2 AC 100% 2ms 7632KB
3 AC 100% 2ms 7920KB
4 AC 100% 2ms 8112KB
5 AC 100% 2ms 8192KB
6 AC 100% 2ms 8736KB
7 AC 100% 2ms 8336KB
8 AC 100% 2ms 8416KB
9 AC 100% 2ms 7760KB
10 AC 100% 2ms 8304KB
11 AC 100% 1ms 8272KB
12 AC 100% 2ms 8432KB
13 AC 100% 2ms 7536KB
14 AC 100% 2ms 8336KB
15 AC 100% 2ms 7248KB
16 AC 100% 2ms 7984KB
17 AC 100% 1ms 8272KB
18 AC 100% 2ms 8720KB
19 AC 100% 2ms 8416KB
20 AC 100% 2ms 7600KB
21 AC 100% 2ms 8720KB
22 AC 100% 2ms 8672KB
23 AC 100% 2ms 8416KB
24 AC 100% 2ms 7232KB
25 AC 100% 2ms 8400KB
26 AC 100% 2ms 8416KB
27 AC 100% 1ms 8304KB
28 AC 100% 2ms 8400KB
29 AC 100% 2ms 7792KB
30 AC 100% 1ms 8272KB

ソースコード

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
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; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
            ∧_∧  
      ∧_∧  (´<_` )  Welcome to My Coding Space!
     ( ´_ゝ`) /  ⌒i     
    /   \     | |     
    /   / ̄ ̄ ̄ ̄/  |  
  __(__ニつ/     _/ .| .|____  
     \/____/ (u ⊃  
---------------------------------------------------------------------------------------------------*/




int F, S;
//---------------------------------------------------------------------------------------------------
int chk(int f, int s) {
    if (f < 2 or s < 1) return 0;
    return 1 - chk(f - 2, s - 1);
}
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> F >> S;

    if (chk(F, S)) printf("O\n");
    else printf("K\n");
}