結果

問題 No.2240 WAC
ユーザー tails
提出日時 2023-03-10 21:51:51
言語 cLay
(20241019-1)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 2,640 ms
コンパイル使用メモリ 172,336 KB
実行使用メモリ 7,896 KB
最終ジャッジ日時 2024-09-18 04:08:21
合計ジャッジ時間 3,071 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

void dame(){
	wt("No");
	exit(0);
}

{
	ll@n,@m;
	string@s;
	ll c=0,w=0,a=0;
	for(char d:s){
		if(d=='A'){
			++a;
		}
		if(d=='C'){
			if(++c>a){
				dame();
			}
		}
		if(d=='W'){
			if(a>m+w++){
				dame();
			}
		}
	}
	wt("Yes");
}
0