L1-030. 一帮一
来源:互联网 发布:海量数据存储方案 编辑:程序博客网 时间:2024/05/20 12:21
//AC
#include <iostream>#include <cstdlib>#include <stdio.h>#include <algorithm>#include <math.h>#include <string.h>#include <queue>#include <stack>#include <vector>#include <map>#include <set>typedef long long ll;using namespace std;struct stu{ int sex; char name[10];};int main(){ int n; struct stu student[52]; scanf("%d",&n); int vis[52]={0}; for (int i=1; i<=n; i++) { scanf("%d%s",&student[i].sex,student[i].name); } for (int i=1; i<=n/2; i++) { cout<<student[i].name<<" "; for (int j=n; n/2<j; j--) { if(vis[j]==0&&student[i].sex!=student[j].sex){ cout<<student[j].name<<endl; vis[j]=1; break; } } } return 0;}
0 0
- L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- PAT L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一 java
- L1-030. 一帮一
- L1-030. 一帮一
- pat:L1-030. 一帮一
- L1-030. 一帮一
- L1-030. 一帮一
- 天梯赛 L1-030. 一帮一
- 2017-03-12校内训练 01按键
- python学习之三
- eclipse怎么排除fckeditor报错问题? [问题点数:40分,结帖人CHNRosin]
- Intelij IDEA 常用快捷键
- pl/sql developer 查询语句无法使用中文条件
- L1-030. 一帮一
- 1.1. Implementing a RouteBuilder Class
- mysqldump导入导出数据库总结;MySQLDump在使用之前一定要想到的事情
- Calculate the expression
- 模拟ls -l命令简易代码demo
- Volley源码分析
- qq项目,,实现了加好友,,和单聊,,
- 在学习zookeeper时候遇见了log4j错误No appenders could be found for logger
- Centos 6 下配置nginx 反向代理Google