結果
| 問題 |
No.3342 AAB Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-19 22:27:02 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 2,000 ms |
| コード長 | 507 bytes |
| コンパイル時間 | 1,866 ms |
| コンパイル使用メモリ | 195,144 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-11-19 22:27:06 |
| 合計ジャッジ時間 | 4,123 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 39 |
ソースコード
#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define long long long
#define INF 1000000001
#define LNF 10000000011000000001
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
string s;
cin >> s;
int p = 1;
int r = 0;
for(int i = 0; i<s.size(); i++)
{
if(s[i] == 'B')
r+=1+(i%2);
}
if(r%3)
cout << "Alice" << endl;
else
cout << "Bob" << endl;
return 0;
}