結果

問題 No.2373 wa, wo, n
ユーザー Akihiro-muraiAkihiro-murai
提出日時 2024-03-19 22:15:52
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 1,425 ms
コンパイル使用メモリ 171,720 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-09-30 05:48:39
合計ジャッジ時間 4,780 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other AC * 12 WA * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
	int n;
	string s,sb;
	
	cin >> n >>s;
	vector<string>ss{"wa","wo","n","?a","?o","w?","?"};
	for(auto c:s){
		sb+=c;
		if(sb.size()>2){
			cout<<"No"<<endl;
		}
		if(find(ss.begin(),ss.end(),sb)!=ss.end()){
			sb="";
		}
	}
	cout<<"Yes"<<endl;
	
	
}
0