ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1575. Yekaterinburg Subway 2

why there is a string in test#2 doesn't show up in the map ?
Posted by William Chou 17 Feb 2011 14:47
I insert all string that show up in the map into index (std::map<string,int> index).
And I use these code to debug:
string s1,s2;
cin >> s1 >> s2;
if (index.find(s1) == index.end() || index.find(s2) == index.end())
    while (true);//if the string doesn't show up in the map,I will get TLE.
...
And I got TLE #2.
Who can help me?
Thanks.
Sorry for my poor English.
PS:It's guarantee that I won't insert wrong string into index.

Edited by author 17.02.2011 14:50
Re: why there is a string in test#2 doesn't show up in the map ?
Posted by Sandro (USU) 18 Feb 2011 00:49
Test for you:

1
Himmash Nizhne_Isetskaya

Good luck! :)
Re: why there is a string in test#2 doesn't show up in the map ?
Posted by William Chou 20 Feb 2011 12:15
ありがど ございます。
thanks for your test,I found I forgot a comma in my code.
But passed compile.
- -
AC now.