結果
問題 | No.418 ミンミンゼミ |
ユーザー |
![]() |
提出日時 | 2016-09-29 17:45:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 552 bytes |
コンパイル時間 | 674 ms |
コンパイル使用メモリ | 88,024 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-16 01:31:29 |
合計ジャッジ時間 | 1,440 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> #include <sstream> #include <iostream> #include <string> #include <cstdio> #include <cmath> using namespace std; int main() { string S; int cnt = 0; cin >> S; for (int l = 0; l < S.size()-2; l++) { if (S[l] == 'm' && S[l+1] == 'i') { for (int r = l + 2; r < S.size(); r++) { if (S[r] != '-' && S[r] != 'n') break; if (S[r] == 'n') { cnt++; break; } } } } cout << cnt << endl; return 0; }