結果
問題 |
No.2373 wa, wo, n
|
ユーザー |
|
提出日時 | 2024-03-19 22:05:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 342 bytes |
コンパイル時間 | 1,501 ms |
コンパイル使用メモリ | 169,784 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-09-30 05:48:18 |
合計ジャッジ時間 | 4,948 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 10 TLE * 1 -- * 28 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n; string s; cin >> n >>s; vector<string>ss{"wa","wo","n","?a","?o","w?","?"}; for(auto &cs:ss){ auto sp=s.find(cs); while(sp!=string::npos){ s.erase(sp,cs.size()); sp=s.find(cs); } } if(s.empty()){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } }