結果

問題 No.418 ミンミンゼミ
ユーザー Yut176
提出日時 2016-10-08 20:43:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 521 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 73,244 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-16 01:56:05
合計ジャッジ時間 1,344 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
using namespace std;

int main(){

  string s;
  cin >> s;

  s += " ";

  int cnt = 0;
  bool fl = false;
  for(int i=0; i<s.size(); i++){
    if( s[i] == '-' ) continue;
    if( s[i] == 'm' && s[i+1] == 'i' ) fl = true;

    if( s[i] == 'n' && fl ){
      cnt++;
      fl = false;
    }
  }
  cout << cnt << endl;

  return 0;
}
0