文章目录

  • 一、Is your horseshoe on the other hoof?
  • 总结

一、Is your horseshoe on the other hoof?

本题链接:Is your horseshoe on the other hoof?

题目
A. Is your horseshoe on the other hoof?
time limit per test2 seconds
memory limit per test256 megabytes
inputstandard input
outputstandard output
Valera the Horse is going to the party with friends. He has been following the fashion trends for a while, and he knows that it is very popular to wear all horseshoes of different color. Valera has got four horseshoes left from the last year, but maybe some of them have the same color. In this case he needs to go to the store and buy some few more horseshoes, not to lose face in front of his stylish comrades.

Fortunately, the store sells horseshoes of all colors under the sun and Valera has enough money to buy any four of them. However, in order to save the money, he would like to spend as little money as possible, so you need to help Valera and determine what is the minimum number of horseshoes he needs to buy to wear four horseshoes of different colors to a party.

Input
The first line contains four space-separated integers s1, s2, s3, s4 (1 ≤ s1, s2, s3, s4 ≤ 109) — the colors of horseshoes Valera has.

Consider all possible colors indexed with integers.

Output
Print a single integer — the minimum number of horseshoes Valera needs to buy.

Examples
input
1 7 3 3
output
1

input
7 7 7 7
output
3

本博客给出本题截图

题意:输入四个数,找出有多少个不同的数,然后用4 - 这个数并输出

AC代码

#include <iostream>
#include <set>using namespace std;set <int> s;int main()
{for (int i = 0; i < 4; i ++ ){int a;cin >> a;s.insert(a);}cout << 4 - s.size() << endl;return 0;
}

总结

水题,不解释

Is your horseshoe on the other hoof?相关推荐

  1. Wand mixture在Horseshoe模型中的应用

    Wand mixture在Horseshoe模型中的应用 Wand et al (2011) Mixture Horseshoe模型的算法 Wand et al (2011) Mixture X∼C+ ...

  2. Horseshoe prior的R package介绍:HS.normal.mean函数

    Horseshoe prior的R package介绍:HS.normal.mean函数 最近做的一些事情需要和Horseshoe prior对比,所以一直在看Horseshoe的一些资料.上周做了一 ...

  3. aMCMC for Horseshoe: algorithms

    aMCMC for Horseshoe: algorithms Exact Algorithm Step 1: sampling η\etaη Step 2: sampling ξ\xiξ Step ...

  4. HOOF(Histogram of Oriented Optical Flow)特征

    看微表情识别的相关论文,总会提到各种手工特征,HOOF就是其中一种.HOOF特征全称Histogram of Oriented Optical Flow,出自09年的一篇论文Histograms of ...

  5. P3609 [USACO17JAN] Hoof, Paper, Scissor G

    题目背景 本题与 银组同名题目 在题意上一致,唯一的差别在于对变手势次数的限制. 题目描述 你可能玩过"石头,剪刀,布",这个游戏在奶牛中同样流行,不过它的名字变成了"蹄 ...

  6. 洛谷 P3069 Hoof, Paper, Scissor G

    原题链接 首先,这道题用记搜就行,甚至都不用STL. 先把数组(我说过不用STL)写上 long long memory[4][21][100001] = {0}; 第二,我们要有一个可以判断输赢的函 ...

  7. 终极单词index 排序 G-H

    终极英语单词12000 1 变身口语达人3000词 1-3000 终极英语单词12000 2 成为英语学霸3000词 3001-6000 终极英语单词12000 3 畅读英文报刊3000词 6001- ...

  8. 《数据科学家养成手册》第十章--混沌论

    <For the want of nail> For the want of a nail, the shoe was lost;for want of a shoe, the horse ...

  9. 谷歌用1.2万个模型“推翻”现有无监督研究成果!斩获ICML 2019最佳论文

    作者 | 夕颜.Just 出品 | AI科技大本营(ID:rgznai100) 6 月 11 日,在美国加州长滩举行的 ICML 公布了 2019 年最佳论文奖,来自苏黎世联邦理工大学.谷歌大脑等的团 ...

  10. 统计学权威盘点过去50年最重要的统计学思想,因果推理、bootstrap等上榜,Judea Pearl点赞...

    作者 | 陈彩娴.Mr Bear 编辑 | 青暮 本文转自AI科技评论 近日,图灵奖得主."贝叶斯网络之父"Judea Pearl在Twitter上分享了一篇新论文"Wh ...

最新文章

  1. 算法编程Algos Programming
  2. 准确度判断 语义分割_Mask R-CNN(目标检测语义分割)测试
  3. luogu P4408 [NOI2003]逃学的小孩(树的直径)
  4. 重构——39以多态取代条件表达式(Replace Conditional with Polymorphism)
  5. 【渝粤教育】国家开放大学2019年春季 0134-22T劳动法学 参考试题
  6. php再次确认密码,Laravel6.2中用于用户登录的新密码确认流程详解
  7. matlab彩色图像变暗
  8. stata学习之空间权重矩阵制作
  9. unity3d Physics.Raycast和Ray(射线)
  10. java 关键字 val,java关键字final用法知识点
  11. JAVA数据缓存之内存缓存
  12. react根据中文获取拼音_React — input标签输入中文的拼音时候会触发onChange事件解决...
  13. 高通msm8953平台摄像头移植
  14. 关键词文章生成器-智能关键词文章生成器
  15. 项目不同阶段的风险特征
  16. python判断是否是英文字母_python学习:判断字符串中字母数字空格的个数
  17. select设置选中option
  18. 2013-8-17 上周工作总结
  19. 数字图像处理——第二章(数字图像基础)
  20. 从一碗小米粥谈装饰器模式,代理模式的区别

热门文章

  1. python数据分析04--双均线策略、金叉与死叉的理解
  2. html注册cab包,OCX控件打包成CAB并实现数字签名过程
  3. Python图像处理(Pillow/PIL)入门
  4. CCNet_Criss-Cross Attention for Semantic Segmentation
  5. xbox360使用_从Xbox360浏览网页
  6. php系统主题,第8章 drupal主题系统
  7. 矿物质防火电缆对于水的防护也很重要
  8. 360浏览器保存的html没有图标,电脑360浏览器图标不见了怎么办
  9. 【小白学习之路】Java实现简单的飞机大战小游戏
  10. python 城市地图_Python查询一个城市的谷歌地图的经度和纬度