POJ2013 Symmetric Order(继续我的水题之路)

【题意简述】:这个题意描述很简单,看输入输出就可以了。

【分析】:还是刷水题心情好点~

不过,不知为什么我的代码,G++过了,而C++却CE。

// 748K 16Ms
#include<iostream>
#include<cstdio>
using namespace std;
#include<cstring>

string cha[26];
string cha1[26],cha2[26];

int main()
{
	int n;
	int count = 1;
	while(cin>>n,n)
	{
		int count1 = 1;
		int count2 = 1;
		for(int i = 1;i<=n;i++)
		{
			cin>>cha[i];
			if(i%2)
				cha1[count1++] = cha[i];
			else
				cha2[count2++] = cha[i];
		}
		cout<<"SET "<<count<<endl;
		for(int i = 1;i<count1;i++)
			cout<<cha1[i]<<endl;
		for(int i = count2-1;i>=1;i--)
			cout<<cha2[i]<<endl;
		count++;
	}
	return 0;
}
时间: 2024-08-01 23:06:38

POJ2013 Symmetric Order(继续我的水题之路)的相关文章

5.1个人赛解题报告(区间dp,按位与或,图论等水题)

这次5.1打了一场个人赛,已经连赛了三周了,有点疲惫感觉,可能自己太水了,每次都有点小紧张. 这次只解出来三道题,然而有一道按位与按位或的水题不知道思路实在是做题太少,还有就是第一题区间DP,也消耗了不少的时间,但是没有成功的写出来,还是不够熟练啊. 下面写报告 A. System Administrator time limit per test 2 seconds memory limit per test 256 megabytes input standard input output

POJ百道水题列表

以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive

2015南阳CCPC L - Huatuo&#39;s Medicine 水题

L - Huatuo's Medicine Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 无 Description Huatuo was a famous doctor. He use identical bottles to carry the medicine. There are different types of medicine. Huatuo put medicines into the bottles and chain these b

hdu5360 Hiking(水题)

转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud Hiking Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 724    Accepted Submission(s): 384Special Judge Problem Description There are 

POJ 3030. Nasty Hacks 模拟水题

Nasty Hacks Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13136   Accepted: 9077 Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of malicious software which teenagers may use to fool their friends.

HDOJ 2317. Nasty Hacks 模拟水题

Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of

codeforces Gym 100187L L. Ministry of Truth 水题

L. Ministry of Truth Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/K Description Andrey works in the Ministry of Truth. His work is changing articles in newspapers and magazines so that they praise the Party an

poj2051&amp;&amp;UVALive 3135 水题

http://poj.org/problem?id=2051 Argus Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 9716   Accepted: 4543 Description A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traff

poj 1002:487-3279(水题,提高题 / hash)

487-3279 Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 236746   Accepted: 41288 Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phras