結果

問題 No.1506 Unbalanced Pocky Game
ユーザー kotatsugamekotatsugame
提出日時 2021-05-14 22:09:49
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 558 ms
コンパイル使用メモリ 64,496 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-02 01:26:29
合計ジャッジ時間 3,250 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 63
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
using namespace std;
int N;
int A[2<<17];
main()
{
	cin>>N;
	for(int i=0;i<N;i++)cin>>A[i];
	bool flag=true;
	for(int i=1;i<N;i++)
	{
		if(A[i]>1)flag=true;
		else flag=!flag;
	}
	cout<<(flag?"Alice":"Bob")<<endl;
}
0