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/ ...
随机推荐
- re-sign重签名
准备: ① re-sign.jar重签名工具:(下载地址为:http://troido.de/downloads/category/1): ② 从D:\Android\sdk\build-tools\ ...
- python去除html空格
如下面的 <td> 柳暗花溟</td> html里面的空格 ,想直接用strip()函数去除是不可能的,必须显式的去掉\xa0 例如以上的就可以这样的方式去除空 ...
- Codeforces 264B Good Sequences(DP+素数筛)
题目链接:http://codeforces.com/problemset/problem/264/B 题目大意:给出n个单调递增的数,让你找出最长的好序列,好序列是一种单调递增的并且相邻元素的最大公 ...
- $()与document.getElementById
$('#a')是返回一个jquery对象 $('#a')[0]是一个element对象 document.getElementById('a') return 一个element对象
- servlet 学习笔记(二)
---------------------第二讲--------------------------------- 开发servlet有三种方法: 1.实现servlet接口(最原始的) 实现接口的5 ...
- 使用Kafka、Elasticsearch、Grafana搭建业务监控系统(三)Elasticsearch
https://blog.csdn.net/tonywu1992/article/details/83576863
- 一行代码实现Okhttp,Retrofit,Glide下载上传进度监听
https://mp.weixin.qq.com/s/bopDUFMB7EiK-MhLc3KDXQ essyan 鸿洋 2017-06-29 本文作者 本文由jessyan投稿. jessyan的博客 ...
- box-sizing 盒子模型不改变大小
参考 box-sizing 相关说明 在需要设置元素的内边距或者外边距而不想改变整体大小时,可以使用该属性,记录之. .simple { width: 500px; margin: 20px auto ...
- JavaScript event loop事件循环 macrotask与microtask
macrotask 姑且称为宏任务,在很多上下文也被简称为task.例如: setTimeout, setInterval, setImmediate, I/O, UI rendering. mic ...
- ASP.NET:MVC模板化机制
模版化的核心是定制ViewEngine.完整的模板化必须实现3个功能:1.网站的多套模版(razor)支持 2.模版的多样式(style)支持. 3.按需实现模版:没有实现的加载默认模版. 我们除了要 ...