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/ ...
 
随机推荐
- 十、springboot之web开发打包生产
			
打成war包 打成war包一般可以分两种方式来实现,第一种可以通过eclipse这种开发工具来导出war包,另外一种是使用命令来完成,这里主要介绍后一种 1.修改配置文件 maven:pom文件 &l ...
 - linux查看内存、CPU占用资源最多的进程
			
[内存占用] #利用ps命令,默认使用ps参数会显示的结果 ps -aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 ...
 - Python字符串(Str)详解
			
字符串是 Python 中最常用的数据类型.我们可以使用引号('或")来创建字符串. 创建字符串很简单,只要为变量分配一个值即可 字符串的格式 b = "hello itcast. ...
 - CSS — 贝塞尔曲线(cubic-bezier)
			
cubic-bezier 又称三次贝塞尔,主要是为 animation 生成速度曲线的函数,规定是 cubic-bezier(<x1>, <y1>, <x2>, & ...
 - wpf设置某容器透明,而不应用到容器的子元素的方法
			
以Border打比方: <Border.Background> <SolidColorBrush Opacity="0.4" Color="Black& ...
 - 10 个优质的 Laravel 扩展推荐
			
这里有 10+ 个用来搭建 Laravel 应用的包 为何会创建这个包的列表?因为我是一个「比较懒」的开发者,在脸书上是多个 Laravel 小组的成员.平日遇到最多的问题就是开发是需要用那些包.我很 ...
 - MySQL学习笔记:三种组内排序方法
			
由于MySQ没有提供像Oracle的dense_rank()或者row_number() over(partition by)等函数,来实现组内排序,想实现这个功能,还是得自己想想办法,最终通过创建行 ...
 - 全方位掌握nsis脚本
			
NSIS 确实是一个不错的安装程序制作软件.新版本 2.0a7 真正实现了中文支持和支持 WinXP 的安装对话框. 不过要用它实现漂亮的安装界面和完美的安装功能就必须好好的写脚本. 而 NSIS 的 ...
 - xtrabckup备份报错:Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/data/mysql/mysql.sock' (2).
			
1.做软连接 [root@xxxxxx:/data/backup/log]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock [root@xxxxxxx ...
 - PHP问题解决
			
1.PHP在上传文件的时候出现错误Internal Server Error Internal Server ErrorThe server encountered an internal error ...