10009 - All Roads Lead Where?
Moderator: Board moderators
Re: 10009 - All Roads Lead Where?
@brianfry713....Doesn't help...still RE...
I have submitted most of my questions in C++ without return 0. Its mandatory in C but not in C++, thats not the reason for RE in this case.
I have submitted most of my questions in C++ without return 0. Its mandatory in C but not in C++, thats not the reason for RE in this case.
-@ce
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10009 - All Roads Lead Where?
Maybe there are more than 30 cities.
Check input and AC output for thousands of problems on uDebug!
Re: 10009 - All Roads Lead Where?
@brianfry713, the question states
So, there can be maximum 26 cities.A city name consists of one or more letters, the first of which is in uppercase. No two cities begin with the same letter.
-@ce
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10009 - All Roads Lead Where?
line 55 should be
b = m.find(str2)->second;
instead of
a = m.find(str2)->second;
b = m.find(str2)->second;
instead of
a = m.find(str2)->second;
Check input and AC output for thousands of problems on uDebug!
Re: 10009 - All Roads Lead Where?
i dunno for what reason my mapped values change..
eg in the test case :
1
6 1
Rome BUET
BUET TSC
TSC Shahbag
Sahbag Nilkhet
Nilkhet Katabon
Katabon ElephantRoad
ElepehantRoad Rome
mapped value of ElepehantRoad should be 7.
but it changes to 0 when queried.
can anyone tell me what I should do?
thnx in advance.
eg in the test case :
1
6 1
Rome BUET
BUET TSC
TSC Shahbag
Sahbag Nilkhet
Nilkhet Katabon
Katabon ElephantRoad
ElepehantRoad Rome
mapped value of ElepehantRoad should be 7.
but it changes to 0 when queried.
can anyone tell me what I should do?
thnx in advance.
Code: Select all
AC
Last edited by Labib on Fri Mar 08, 2013 1:32 pm, edited 1 time in total.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10009 - All Roads Lead Where?
You changed the spelling
ElephantRoad
ElepehantRoad
ElephantRoad
ElepehantRoad
Check input and AC output for thousands of problems on uDebug!
Re: 10009 - All Roads Lead Where?
testcase was from an earlier post... has problems
but the main code still WA
@brainfry
but the main code still WA

-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10009 - All Roads Lead Where?
That is AC code.
Check input and AC output for thousands of problems on uDebug!
Re: 10009 - All Roads Lead Where?
that's rilly weird
but thanks anyway brainfry!
but thanks anyway brainfry!

-
- New poster
- Posts: 6
- Joined: Fri Jun 21, 2013 3:31 am
Re: 10009 - All Roads Lead Where?
please give me critical test case , that i could find the bug in my code .
Thanks in advance .
Thanks in advance .
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10009 - All Roads Lead Where?
Try the I/O in this thread.
Check input and AC output for thousands of problems on uDebug!
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 10009 - All Roads Lead Where?
Don't print a blank line at the start of the output.
Check input and AC output for thousands of problems on uDebug!
Re: 10009 - All Roads Lead Where?
Thank you so much bro 
