6,搁着串糖葫芦呢?
2025-08-22 16:06:57
发布于:浙江
33阅读
0回复
0点赞
全部评论 2
你写了啥代码,让我看一下(其实看压缩完是否有相邻的字母就行了,数值不重要)。
2025-08-23 来自 广东
0#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; map<string,bool> m; while(n--){ string a; int b; cin >> a >> b; if(m[a] == true){ cout << "No"; return 0; } else { m[a] = true; } } cout << "Yes"; return 0; }
2025-08-24 来自 浙江
0AC代码
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; string p; while(n--){ string a; int b; cin >> a >> b; if(p == a){ cout << "No"; return 0; } else { p = a; } } cout << "Yes"; return 0; }
2025-08-24 来自 浙江
0
我一样
2025-08-22 来自 湖南
0
有帮助,赞一个