解法:
暴力
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define endl '\n'
int main() {
int n, m, sum = 1;
cin >> n >> m;
string s;
cin >> s;
int pre = s[0] - '0';
int t = 0;
for (int i = 1; i < s.size(); i++) {
t = t * 10 + (s[i] - '0');
if (t > pre) {
sum++;
pre = t;
t = 0;
}
}
if (sum >= m) cout << "miaomiao";
else cout << "wangwang";
return 0;
}