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 1434. Buses in Vasyuki

How to avoid MLE???
Posted by Lebedev_Nicolay[Ivanovo SPU] 29 Apr 2009 02:05
Can anybody tell me, how to store and present graph in this problem??? There are too much edges and vertexes.
Re: How to avoid MLE???
Posted by Fyodor Menshikov 2 May 2009 16:53
there are in total not more than 200000 numbers in the N lines describing the routes

ML is 32 Mb - so you have approx 160 bytes per pair <bus route, bus stop>. More than enough if every vertex contains list of edges/adjacent vertices.