結果
| 問題 |
No.3342 AAB Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-21 16:21:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 375 bytes |
| コンパイル時間 | 1,839 ms |
| コンパイル使用メモリ | 193,588 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-11-21 16:21:15 |
| 合計ジャッジ時間 | 3,670 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 39 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:14:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | scanf("%s", s + 1);
| ~~~~~^~~~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
const int N = 2000010, MOD = 1e9 + 7, INF = 0x3f3f3f3f;
int n, m, w[N];
char s[N];
int main() {
cin >> n;
scanf("%s", s + 1);
int v = 0;
for (int i = 1; i < n + 1; i++) v += (s[i] == 'B') * (1 + (i & 1 ^ 1));
puts(v % 3 ? "Alice" : "Bob");
return 0;
}