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/ ...
随机推荐
- 【bzoj3065】: 带插入区间K小值 详解——替罪羊套函数式线段树
不得不说,做过最爽的树套树———— 由于有了区间操作,我们很容易把区间看成一棵平衡树,对他进行插入,那么外面一层就是平衡树了,这就与我们之前所见到的不同了.我们之前所见到的大多数是线段树套平衡树而此题 ...
- 22 Gobs of data 设计和使用采集数据的包
Gobs of data 24 March 2011 Introduction To transmit a data structure across a network or to store it ...
- netstat-ll-grep-nohup-df-supervisord
============http://man.linuxde.net/=========== 0 vi / n是查找下一个,alt+n是上一个 u撤销上一步,回到上一步 1. 根据进程号(4974) ...
- 深入理解HashMap(及hash函数的真正巧妙之处)
原文地址:http://www.iteye.com/topic/539465 Hashmap是一种非常常用的.应用广泛的数据类型,最近研究到相关的内容,就正好复习一下.网上关于hashmap的文章很多 ...
- jquery 绑定,mvc和webform的三种方式
asp.net里的绑定方式,on的绑定方式无效 $('#SelCommandType').bind('click', function () { }); mvc里的绑定方式 $('#DownList' ...
- C++ 必须使用初始化列表
继承关系中,父类无默认构造函数 类类型类成员变量无默认构造函数 const类型成员变量 引用类型成员变量 不使用初始化列表,在创建对象调用构造函数之前会对所有的成员变量进行默认初始化,然后再执行构造函 ...
- MySQL学习笔记:新增一列
1.在一个已建好的表中,最后一列位置添加一列,可使用: ALTER TABLE aa_numbers_small ADD COLUMN date_time DATE NOT NULL; 2.添加一列到 ...
- 计算a+b
输入: 1 2 结果: 3 说明:只能输入数字,两数间只有一个空格 代码如下:(vc6编译) #include <stdio.h> #include <conio.h> voi ...
- Java深度复制List内容。
最近在工作的时候,有一个小需求,需要复制List的内容,然后会改变其中的数据,但是试了几种复制的方法,都是将原有的数据和复制后的数据都改变了,都没有达到我想要的效果. 其中涉及到了 "浅复制 ...
- bzoj 1263 [SCOI2006]整数划分
n >= 6 的时候减3, 最后分类讨论, 上个Java import java.math.BigInteger; import java.util.*; public class Main { ...