题解 CF228A 【Is your horseshoe on the other hoof?】 发表于 2019-01-16 更新于 2026-03-09 阅读次数: Waline: 阅读次数: CF228A 【Is your horseshoe on the other hoof?】题解。 这题怎么没人做呢…… 其实看了我的翻译就知道是求4个数里有几个重复的-1 所以很简单了 代码很短就不写注释了 123456789#include <bits/stdc++.h>using namespace std;int a[4],ans;int main(void){ scanf ("%d%d%d%d",&a[0],&a[1],&a[2],&a[3]); sort (a,a+4); for (int i=1;i<4;i++)if (a[i]==a[i-1])ans++; printf ("%d",ans);}