結果

問題 No.2 素因数ゲーム
ユーザー neckrawarmerneckrawarmer
提出日時 2021-10-06 14:08:44
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 957 bytes
コンパイル時間 4,865 ms
コンパイル使用メモリ 266,620 KB
実行使用メモリ 814,092 KB
最終ジャッジ日時 2023-09-30 08:46:12
合計ジャッジ時間 7,924 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 3 ms
4,428 KB
testcase_06 AC 155 ms
108,000 KB
testcase_07 AC 174 ms
122,216 KB
testcase_08 AC 160 ms
112,000 KB
testcase_09 MLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#if __has_include(<atcoder/all>)
#include <atcoder/all>
using namespace atcoder;
using mint = modint1000000007;
#endif
using ll = long long;
using ld = long double;
const ll INF = 1ll<<60;
const ld EPS = 1.0/1e9;
#define endl "\n"
#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()
#define del(x) sort(all(x)); x.erase(unique(all(x)),x.end());

int main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ll n; cin >> n;
  vector<ll>lp(n+1);
  vector<ll>pr;
  for(int i=2;i<=n;i++){
    if(lp[i]==0){
      lp[i]=i;
      pr.push_back(i);
    }
    for(int j=0;j<(int)pr.size() && pr[j]<=lp[i] && i*pr[j]<=n;j++){
      lp[i*pr[j]]=pr[j];
    }
  }
  map<ll,ll>mp;
  while(n!=1){
    mp[lp[n]]++; n/=lp[n];
  }
  ll XOR=0;
  fore(c,mp){
    XOR^=c.second;
  }
  if(XOR) cout << "Alice";
  else cout << "Bob";
}
0