結果
| 問題 | No.418 ミンミンゼミ |
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2016-09-29 17:45:27 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 552 bytes |
| 記録 | |
| コンパイル時間 | 519 ms |
| コンパイル使用メモリ | 102,524 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-30 16:51:05 |
| 合計ジャッジ時間 | 1,271 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
prog470