poj2013
来源:互联网 发布:国际现货黄金软件 编辑:程序博客网 时间:2024/06/05 20:01
题目大意:
和zoj2172相同。输入的每一对单词都是一组,输出 一个在最下,一个在最上
解题思路:
无
代码如下:
#include<stdio.h>#include<string.h>int main(){ int n; int i,j; char str[16][26]; char str1[16][26]; int set=0; while(scanf("%d",&n)!=EOF) { memset(str,0,sizeof(str)); memset(str1,0,sizeof(str1)); if(n==0) break; for(i=1;i<=n;i++) { scanf("%s",str[i]); } for(i=1;i<=n;i++) { if(i%2) { strcpy(str1[i/2+1],str[i]); } else { j=i/2; strcpy(str1[n+1-j],str[i]); } } set++; printf("SET %d\n",set); for(i=1;i<=n;i++) { printf("%s\n",str1[i]); } } return 0; }
0 0
- poj2013
- poj2013
- poj2013
- POJ2013浅析------Symmetric Order
- 【POJ2013】:Symmetric Order
- POJ2013 Symmetric Order(继续我的水题之路)
- Activiti工作流表结构详解
- poj1961
- ABAP基础类型温习
- Github windows客户端的使用
- RTP封装H264
- poj2013
- Spring Data —— 完全统一的API?
- poj2017
- BLE Gatt Date Time Service Implimentation in nRF51/52
- 使用hive查询hdfs数据时报字段类型异常
- [硕.Love Python] QuickSort(快速排序)
- 卡尔曼滤波原理及实现
- poj2027
- LabVIEW崩溃关闭:Aeccess violation (0xC0000005)解决方法