結果
| 問題 |
No.418 ミンミンゼミ
|
| コンテスト | |
| ユーザー |
Xelmeph
|
| 提出日時 | 2016-09-09 22:24:49 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 733 bytes |
| コンパイル時間 | 528 ms |
| コンパイル使用メモリ | 74,136 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-16 01:14:14 |
| 合計ジャッジ時間 | 1,262 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <set>
#include <fstream>
#include <stdint.h>
#include <cmath>
#include <algorithm>
#include <utility>
#include <numeric>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define RREP(i,n) for(int i = (n)-1; i >= 0; i--)
#define FOR(i, l, r) for(int i = l; i < r; i++)
#define RFOR(i, l,r) for(int i= (l)-1; i>= (r) ; i--)
int main()
{
ios::sync_with_stdio(false);
int n = 0;
string s;
cin >> s;
REP(i, s.size())
{
if(s.substr(i,2) == "mi")
{
i = i + 2;
while(s[i] == '-') i++;
if(s[i] == 'n')
n++;
}
}
cout << n << '\n';
}
Xelmeph