代码在对1特判的时候要用 if(cnt.count(1)&&cnt[1]>=2) 如果直接cnt[1]>=2 会影响后面cnt.count(1)的判断(即使没有1 代码也会cnt[1] = 1) 可以用[100,100,100] 试一下 ac代码如下: #include<bits/stdc++.h> using namespace std; #define int long long #define yes cout<<"YES\n" #define no cout<<"NO\n" const int LIM = 1e9; int...