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

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

Re: 10009 - All Roads Lead Where?

Post by @ce » Sun Dec 30, 2012 7:32 pm

@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?

Post by brianfry713 » Tue Jan 01, 2013 2:31 am

Maybe there are more than 30 cities.
Check input and AC output for thousands of problems on uDebug!

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

Re: 10009 - All Roads Lead Where?

Post by @ce » Tue Jan 01, 2013 10:12 am

@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?

Post by brianfry713 » Wed Jan 02, 2013 4:15 am

line 55 should be
b = m.find(str2)->second;
instead of
a = m.find(str2)->second;
Check input and AC output for thousands of problems on uDebug!

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

Re: 10009 - All Roads Lead Where?

Post by @ce » Wed Jan 02, 2013 7:40 am

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?

Post by Labib » Tue Mar 05, 2013 10:01 pm

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.

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?

Post by brianfry713 » Tue Mar 05, 2013 10:16 pm

You changed the spelling
ElephantRoad
ElepehantRoad
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?

Post by Labib » Tue Mar 05, 2013 10:27 pm

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?

Post by brianfry713 » Thu Mar 07, 2013 3:03 am

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?

Post by Labib » Fri Mar 08, 2013 1:33 pm

that's rilly weird
but thanks anyway brainfry! :)

Loading...
New poster
Posts: 6
Joined: Fri Jun 21, 2013 3:31 am

Re: 10009 - All Roads Lead Where?

Post by Loading... » Wed Jun 26, 2013 10:24 pm

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?

Post by brianfry713 » Thu Jun 27, 2013 12:03 am

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?

Post by kimbbakar » Wed Nov 13, 2013 8:52 am

problem link: http://ideone.com/y8wRUO

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?

Post by brianfry713 » Thu Nov 14, 2013 12:30 am

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?

Post by kimbbakar » Fri Nov 15, 2013 11:21 am

Thank you so much bro :D

Post Reply

Return to “Volume 100 (10000-10099)”