結果

問題 No.103 素因数ゲーム リターンズ
コンテスト
ユーザー sugim48
提出日時 2014-12-14 23:25:50
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 946 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 727 ms
コンパイル使用メモリ 99,396 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-05 03:13:41
合計ジャッジ時間 1,487 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };

ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

int main() {
	int N; cin >> N;
	int x = 0;
	for (int i = 0; i < N; i++) {
		int M; cin >> M;
		for (int j = 2; j <= M; j++) {
			int cnt = 0;
			while (M % j == 0) {
				M /= j;
				cnt++;
			}
			x ^= cnt % 3;
		}
	}
	cout << (x ? "Alice" : "Bob") << endl;
}
0