結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2023-05-23 10:31:33 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 2,000 ms |
| コード長 | 280 bytes |
| コンパイル時間 | 619 ms |
| コンパイル使用メモリ | 66,288 KB |
| 最終ジャッジ日時 | 2025-02-13 04:11:49 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int n;cin>>n;int x;cin>>x;
int nw = -1;
for(int i = 0; n-1 > i; i++){
cin>>x;
if(x != 1)nw = i+1;
}
if(nw != -1){
cout << ((n-nw)%2 ? "Alice" : "Bob") << endl;
}else{
cout << (n%2 ? "Alice" : "Bob") << endl;
}
}