poj 2503 Babelfish (查找 map)

题目:http://poj.org/problem?id=2503

不知道为什么 poj  的 数据好像不是100000,跟周赛的不一样

2000MS的代码:

 1 #include <iostream>
 2  #include<cstdio>
 3  #include<cstring>
 4  #include<cstdlib>
 5  #include<stack>
 6  #include<queue>
 7  #include<iomanip>
 8  #include<cmath>
 9  #include<algorithm>
10  #include<map>
11  using namespace std;
12  
13  char str[200010][30];
14  int main()
15  {
16       int i,j;
17      char s1[30];
18      map<string,int>mp;
19      i=1;
20      while(1)
21      {
22          char t; j=0;
23          if((t=getchar())=='
')
24          break;
25          str[i][j++]=t;
26          while(1)
27          {
28              t=getchar();
29              if(t==' ')
30              {
31                  str[i][j]='