Codeforces Round #279 (Div. 2) A. Team Olympiad 水题
#include<stdio.h>
#include<iostream>
#include<memory.h>
#include<math.h>
using namespace std; int flag1[];
int flag2[];
int flag3[];
int main()
{
memset(flag1,,sizeof(flag1));
memset(flag2,,sizeof(flag2));
memset(flag3,,sizeof(flag3));
int n;
cin>>n;
int kiss,kiss1=,kiss2=,kiss3=;
int minn=;
for(int i=;i<n;i++)
{
cin>>kiss;
if(kiss==)
flag1[++kiss1]=i;
else if(kiss==)
flag2[++kiss2]=i;
else
flag3[++kiss3]=i;
}
minn=min(kiss1,min(kiss2,kiss3));
cout<<minn<<endl;
for(int i=;i<minn;i++)
{
cout<<flag1[i+]+<<" "<<flag2[i+]+<<" "<<flag3[i+]+<<endl;
}
return ;
}
Codeforces Round #279 (Div. 2) A. Team Olympiad 水题的更多相关文章
- Codeforces Round #367 (Div. 2) A. Beru-taxi (水题)
Beru-taxi 题目链接: http://codeforces.com/contest/706/problem/A Description Vasiliy lives at point (a, b ...
- Codeforces Round #334 (Div. 2) A. Uncowed Forces 水题
A. Uncowed Forces Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/604/pro ...
- Codeforces Round #353 (Div. 2) A. Infinite Sequence 水题
A. Infinite Sequence 题目连接: http://www.codeforces.com/contest/675/problem/A Description Vasya likes e ...
- Codeforces Round #346 (Div. 2) B. Qualifying Contest 水题
B. Qualifying Contest 题目连接: http://www.codeforces.com/contest/659/problem/B Description Very soon Be ...
- Codeforces Round #327 (Div. 2) A. Wizards' Duel 水题
A. Wizards' Duel Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/591/prob ...
- Codeforces Round #360 (Div. 2) C. NP-Hard Problem 水题
C. NP-Hard Problem 题目连接: http://www.codeforces.com/contest/688/problem/C Description Recently, Pari ...
- Codeforces Round #146 (Div. 1) A. LCM Challenge 水题
A. LCM Challenge 题目连接: http://www.codeforces.com/contest/235/problem/A Description Some days ago, I ...
- Codeforces Round #335 (Div. 2) B. Testing Robots 水题
B. Testing Robots Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://www.codeforces.com/contest/606 ...
- Codeforces Round #335 (Div. 2) A. Magic Spheres 水题
A. Magic Spheres Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://www.codeforces.com/contest/606/ ...
随机推荐
- redis从入门到放弃 -> 简介&概念
一.redis简介 Redis是一款开源的.高性能的键-值存储.它常被称作是一款数据结构服务器. 当值支持的主要数据类型为:字符串(strings)类型,括哈希(hashes).列表(lists).集 ...
- IP地址、域名、域名解析系统相关
IP地址(Internet Protocol Address) 它来自TCP/IP协议,存在于其中的IP层,用于实现不同计算机之间的通信,类似于门牌号. 设计之处,IP地址是准备给地球上每一台计算机一 ...
- python面向对象(三)之继承
继承 介绍 继承是从已有的类中派生出新的类,新的类能吸收已有类的数据属性和行为,并能扩展新的能力.继承即常说的is-a关系.子类继承父类的特征和行为,使得子类具有父类的各种属性和方法.或子类从父类继承 ...
- 20165203迭代和JDB测试
1.使用C(n,m)=C(n-1,m-1)+C(n-1,m)公式进行递归编程实现求组合数C(m,n)的功能 public class C { public static void main(Strin ...
- 2016-2017-2 20155309南皓芯java第四周学习总结
教材内容总结 这次我们学习的还是两章的内容,学习任务量跟上次比的话大体上来讲是差不多的. 继承与多态 继承 继承也符合DRY(Don't Repeat Yourself)原则 Role role1 = ...
- django-suit的使用
1.django-suit 是Django admin美化插件 django-suit官方文档 2.django-suit安装 #python pip install django-suit #pyt ...
- peda的官方文档说明
peda在github上的官方文档,摘抄过来,方便查阅. 安装 git clone https://github.com/longld/peda.git ~/peda echo "sourc ...
- CVE-2011-0104 Microsoft Office Excel缓冲区溢出漏洞 分析
漏洞简述 Microsoft Excel是Microsoft Office组件之一,是流行的电子表格处理软件. Microsoft Excel中存在缓冲区溢出漏洞,远程攻击者可利用此 ...
- Dev控件删除按钮的两种方式
测试版本15.2.10:在Dev控件中删除按钮空间有两种方式:1.鼠标右键出现Delete选项,这种删除是不完全的删除,只是删除了按钮的显示,实际上按钮还是存在于代码中的.2.用键盘上的Delete键 ...
- bms_output.put_line使用方法
https://blog.csdn.net/sxww321/article/details/4020300