北大POJ1002题总是超时。求救·····
#include
#include
#include
using namespace std;
int main()
{
int total;
char conver[9] = {'Q','R','S','T','U','V','W','X','Y'};
freopen("input.txt","r",stdin);
std::cin>>total;
map strSet;
string in;
while(total--)
{
std::cin>>in;
int index=0;
char *str=new char[in.size()];
char *res = new char[in.size()];
for(int i=0; i
{
if(in[i]!='-')
{
if(in[i]>'Q'&&in[i]
{
str[index]=conver[int(in[i]-'Q')-1];
index++;
}else
{
str[index]=in[i];
index+