http://poj.org/problem?id=3007
用STL---string、map、substr、reverse(),结果老是超时,
然后,输入改用char * ,不用substr和reverse(),在G++下提交可以ac,耗时800多ms
// poj_3007 Organize Your Train part II.cpp : Defines the entry point for the console application.
//
/*
表示伤心,用stl超时了
*/
//#include "stdafx.h"
#pragma warning(disable : 4786)
#include<iostream>
#include<string>
#include<cstdio>
#include<map>
#include<cstring>
#include<algorithm>
using namespace std;
int solve(char *s)
{
int sum=1,i,len=strlen(s);
char ss[77],c;