結果
| 問題 |
No.2240 WAC
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-04-22 05:29:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 827 bytes |
| コンパイル時間 | 890 ms |
| コンパイル使用メモリ | 103,796 KB |
| 最終ジャッジ日時 | 2025-02-12 12:56:25 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 WA * 14 |
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>
using namespace std;
using ll = long long;
int main(){
int N, M;
bool f;
string S;
cin >> N >> M >> S;
f=0;
for (int i=0; i<2*(N+M); i++){
if (S[i] == 'A') f=1;
else if (S[i] == 'C'){
if (!f){
cout << "No" << endl;
return 0;
}
}
}
f=0;
for (int i=2*(N+M)-1; i>=0; i--){
if (S[i] == 'A') f=1;
else if (S[i] == 'W'){
if (!f){
cout << "No" << endl;
return 0;
}
}
}
cout << "Yes" << endl;
return 0;
}
srjywrdnprkt