結果
| 問題 |
No.418 ミンミンゼミ
|
| コンテスト | |
| ユーザー |
language_43
|
| 提出日時 | 2016-09-12 13:49:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 582 bytes |
| コンパイル時間 | 513 ms |
| コンパイル使用メモリ | 65,460 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 03:54:06 |
| 合計ジャッジ時間 | 1,416 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 23 WA * 2 |
ソースコード
# include <iostream>
# include <cstring>
# include <string>
# include <vector>
# include <cmath>
# include <sstream>
# include <algorithm>
using namespace std;
int main(){
int sum = 0;
string str;
cin >> str;
int i=0;
int count =0;
while(i <= str.size()){
if(str[i] == 'm' && str[i+1] == 'i'){
i+=2;
count = 1;
}else if(str[i] == '-' && count == 1){
i++;
count = 2;
}else if(str[i] == 'n' && str[i+1] != 'n' && count == 2){
i+=2;
sum++;
}else if(str[i] == 'n' && str[i+1] != 'n'){
i+=2;
}else{
i++;
}
}
cout << sum << endl;
return 0;
}
language_43