标签:des style blog http color strong
Description
Input
Output
Sample Input
7 Bo Pat Jean Kevin Claude William Marybeth 6 Jim Ben Zoe Joey Frederick Annabelle 5 John Bill Fran Stan Cece 0
Sample Output
SET 1 Bo Jean Claude Marybeth William Kevin Pat SET 2 Jim Zoe Frederick Annabelle Joey Ben SET 3 John Fran Cece Stan Bill
#include<iostream> #include<cstring> using namespace std; int b,c,k,i,s,x,y,n; char a[1000][26]; int main() { int n,i,s=0; while(cin>>n&&n) { s++; for(i=0;i<n;i++) cin>>a[i]; cout<<"SET "<<s<<endl; for(i=0;i<n;i+=2) cout<<a[i]<<endl; if(i==n) for(i=n-1;i>0;i-=2) cout<<a[i]<<endl; else for(i=n-2;i>0;i-=2) cout<<a[i]<<endl; } return 0; }
B - Symmetric Order(3.3.1),布布扣,bubuko.com
标签:des style blog http color strong
原文地址:http://blog.csdn.net/rememberautumn/article/details/37767847