## 10009 - All Roads Lead Where?

All about problems in Volume 100. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

@ce
Learning poster
Posts: 71
Joined: Mon May 28, 2012 8:46 am
Location: Ranchi, India

### 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.
-@ce

brianfry713
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!

@ce
Learning poster
Posts: 71
Joined: Mon May 28, 2012 8:46 am
Location: Ranchi, India

### Re: 10009 - All Roads Lead Where?

@brianfry713, the question states
A city name consists of one or more letters, the first of which is in uppercase. No two cities begin with the same letter.
So, there can be maximum 26 cities.
-@ce

brianfry713
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;
a = m.find(str2)->second;
Check input and AC output for thousands of problems on uDebug!

@ce
Learning poster
Posts: 71
Joined: Mon May 28, 2012 8:46 am
Location: Ranchi, India

### Re: 10009 - All Roads Lead Where?

Thanks brianfry713...I got AC.
-@ce

Labib
New poster
Posts: 12
Joined: Tue Mar 05, 2013 4:49 pm

### 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

mapped value of ElepehantRoad should be 7.
but it changes to 0 when queried.

can anyone tell me what I should do?

Code: Select all

``````AC
``````
Last edited by Labib on Fri Mar 08, 2013 1:32 pm, edited 1 time in total.

brianfry713
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
Check input and AC output for thousands of problems on uDebug!

Labib
New poster
Posts: 12
Joined: Tue Mar 05, 2013 4:49 pm

### Re: 10009 - All Roads Lead Where?

testcase was from an earlier post... has problems
but the main code still WA @brainfry

brianfry713
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!

Labib
New poster
Posts: 12
Joined: Tue Mar 05, 2013 4:49 pm

### Re: 10009 - All Roads Lead Where?

that's rilly weird
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 .

brianfry713
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!

kimbbakar
New poster
Posts: 5
Joined: Wed Nov 13, 2013 8:48 am

### Re: 10009 - All Roads Lead Where?

Can anyone give me some test case?

brianfry713
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!

kimbbakar
New poster
Posts: 5
Joined: Wed Nov 13, 2013 8:48 am

### Re: 10009 - All Roads Lead Where?

Thank you so much bro