|
|
Try this test 1 100 4 1 1 2 1 3 1 4 1 1 2 3 4 0 0 0 1 5 1 Correct answer is: 3.0200000 4 1 2 3 4 Looks like stations can overlap (have same coordinates) while not being connected with underground! What does this actually mean??? If coordinates are the same then travelling time is still 0. is not it? Even I found that footseed is 0.5 in test 7. But what then? It doesn't change my solution and i can not understand if it actually does... :( You are right, ori and dst stations can overlap connected stations. I think, not only stations can overlap but also original and destination points. Two below tests helped me to understand my mistake when I've received Runtime Error 7 and Wrong Answer 7: 1 100 4 1 1 2 2 3 3 2 2 2 1 3 4 4 2 0 0 1 1 3 3 answer: 0.0282843 4 1 2 4 3 1 100 3 1 1 2 2 3 3 2 1 3 2 1 3 0 0 1 1 1 1 answer: 0.000000 0 Edited by author 26.10.2018 16:55 Edited by author 26.10.2018 16:56 Got correct answers for both tests above (and for all others in other topics). Still WA7. To authors of the problem - burn in hell. try this one 1 100 5 0 0 1 0 9 0 9 9 10 10 1 2 1 3 2 4 0 0 10 10 the result should be 2.6346295 4 4 2 1 3 10 0 test is not correst, no destination point Edited by author 17.12.2022 00:16 Edited by author 17.12.2022 00:16 Edited by author 17.12.2022 00:17 in this test the footspeed is lower than one. sorry for my poor english. GOOD LUCK!!! What does this actually mean? I think it doesn't change anything! (speed < 1 but more that 0) Even I found that footseed is 0.5 in test 7. But what then? It doesn't change my solution and i can not understand if it actually does... :( and speed of underground is 50 in test 7 and some of the coordinates are in scientific notation, I mean it looks like 6.000000e-14 Edited by author 31.10.2021 02:32 If the starting point A is a station but you go by feet, is the station a visited station. For example, what is the solution for the following: 100 101 3 0 0 0 10 1 0 1 2 2 3 0 0 0 0 1 0 1. Stations may not all be connected. You may have to walk on foot between stations. 2. A and B may be one of the stations or may even be the same point. Maybe the best route is from A to B is on foot without using any stations. Consider all cases. 3. Coordinates are floating points, not integer. 4. Simple dijsktra will work. 5. Use a map to store the node number of the points. If A or B are not one of the stations then give them n and n+1 or n+1 and n+2 (depending on indexing). Спасибо парню из предыдущей ветки,лично мне это реально помогло Короче смысл в том,что в 7 тесте либо координаты A совпадают с координатами какой-нибудь станции (или тоже самое с B),либо у нескольких станций одинаковые координаты. Ну и прикол в том,что если вы строите матрицу смежности,то он будет считать что там нет пути, 0 же стоит Hello guys, those, who have wa on 7'th case may try to change output precision to some big number. As for me, it worked on 15 signs. I have no idea why this happens ^,^ If ever dear admins may be interested in case, please compare: id 4772942 has wa7 id 4772947 has ok (line 167). Best regards, mq. I printed result with precision of 7 digits. It seem ridiculous to me, but i've printed up to 9, but got wa. Upon changing a single line of code got ok. :) greetings from 2018. advice worked for me. rofl Read with BufferedReader not with StreamTokenizer. This was only mistake for me for > 100 tries :) IS it special case or something like that? If you have that test please give me. You shouldn't forget inputdata can be not integer but real(coordinates of metro stations or coordinates of point A and B or speeds of metro or foot) good luck (; Help please.I think my prog is OK and i think that is precision problem or something like that. Edited by author 13.06.2011 12:04 Edited by author 13.06.2011 12:41 Edited by author 13.06.2011 13:27 adjacent table g
for N+2 points g[i][j] = time-of-foot for connections g[i][j] = time-of-metro And then I run shortest path. from 0 to n+1 Can somebody give me hint about this testcase. Thanks!!!! Edited by author 05.12.2010 23:32 I had WA 5 when I used type "single" (pascal; in C++ - float) for floating point number. After I have changed to "double" I have got AC. [code was deleted by moderator :-)] Edited by moderator 09.05.2004 00:06 me , too. [code deleted] Edited by moderator 16.03.2006 18:18 may be you had another problem, but i got crash on 3rd test due to i used integer coordinates of stations and A,B points. Good luck, i hope it'll help to somebody I know that the first test is like sample, so I passed begin writeln('2.6346295'); write('4 4 2 1 3'); end. and got WA#2. And my REAL program get the same answer, but I have Crash (floating-point invalid operation) from Judge. This is my program: [Code deleted by author] Please, answer me anybody! Edited by author 24.01.2007 23:29 I don't understand FreePascal at all:) Paste this line Type extended=real; Thank you very much!!! AC now! PS I have never done this myself!) can the speed of traveling be greater then 300000km/sek ? > can the speed of traveling be greater then 300000km/sek ? Check it! if( ... /* speed > 300000 km/sec */ ) while( 1 ) cout << "111\n"; If you have Output Limit Exceeded, write to admins that there are incorrect tests! I mean, take the metro for a few stations, that exit, walk, and take the metro again ? Thanks, A. Thanks - This was not the problem after all, I had a bug in my code and it was driving me crazy, so I asked even the obvious... :) A. Please give me some tests Thanks. |
|
|