Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
| ( 197 ) |
I |
Tram |
PROGRAMMING |
|
|
2700 |
In a Berland city S*** there is a tram engine house and only one tram. Three people work in the house — the tram driver, the conductor and the head of the engine house. The tram used to leave the engine house every morning and drove along his loop route. The tram needed exactly c minutes to complete the route. The head of the engine house controlled the tram’s movement, going outside every c minutes when the tram drove by the engine house, and the head left the driver without a bonus if he was even one second late. It used to be so. Afterwards the Berland Federal Budget gave money to make more tramlines in S***, and, as it sometimes happens, the means were used as it was planned. The tramlines were rebuilt and as a result they turned into a huge network. The previous loop route may have been destroyed. S*** has n crossroads and now m tramlines that links the pairs of crossroads. The traffic in Berland is one way so the tram can move along each tramline only in one direction. There may be several tramlines between two crossroads, which go same way or opposite ways. Every tramline links two different crossroads and for each crossroad there is at least one outgoing tramline. So, the tramlines were built but for some reason nobody gave a thought to increasing the number of trams in S***! The tram continued to ride alone but now the driver had an excellent opportunity to get rid of the unending control of the engine house head. For now due to the tramline network he could choose the route freely! Now at every crossroad the driver can arbitrarily choose the way he can go. The tram may even go to the parts of S*** from where it cannot return due to one way traffic. The driver is not afraid of the challenge: at night, when the city is asleep, he can return to the engine house safely, driving along the tramlines in the opposite direction. The city people were rejoicing for some of the had been waiting for the tram to appear on their streets for several years. Howev |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
278479 |
sankear |
I |
Feb. 10, 2011, 9:17 p.m. |
OK |
Delphi |
TESTS |
73 |
60 |
4812800 |
|
2700 |
|
256210 |
agul |
I |
Jan. 21, 2011, 1:04 p.m. |
OK |
Delphi |
TESTS |
73 |
90 |
18534400 |
|
2700 |
|
162242 |
tourist |
I |
Oct. 24, 2010, 9:47 a.m. |
OK |
Delphi |
TESTS |
73 |
90 |
18534400 |
|
2700 |
|
68220094 |
Deek0_sh |
I |
Jan. 5, 2020, 4:01 a.m. |
OK |
Delphi |
TESTS |
73 |
184 |
17612800 |
|
2700 |
|
164115 |
tuananh93 |
I |
Oct. 25, 2010, 10 a.m. |
OK |
FPC |
TESTS |
73 |
80 |
3276800 |
|
2700 |
|
41004979 |
ReaLNero1 |
I |
July 31, 2018, 9:11 a.m. |
OK |
FPC |
TESTS |
73 |
434 |
2764800 |
|
2700 |
|
3192776 |
lasten |
I |
Feb. 25, 2013, 4:19 a.m. |
OK |
GNU C++ |
TESTS |
73 |
93 |
16384000 |
|
2700 |
|
3180408 |
lasten seen |
I |
Feb. 24, 2013, 2:26 p.m. |
OK |
GNU C++ |
TESTS |
73 |
93 |
16384000 |
|
2700 |
|
19226012 |
lys1280023 |
I |
July 19, 2016, 7:07 a.m. |
OK |
GNU C++ |
TESTS |
73 |
124 |
4300800 |
|
2700 |
|
13827704 |
130705009 |
I |
Oct. 24, 2015, 4:26 p.m. |
OK |
GNU C++ |
TESTS |
73 |
124 |
4300800 |
|
2700 |
|
7412321 |
kawazaki |
I |
Aug. 10, 2014, 9:06 a.m. |
OK |
GNU C++ |
TESTS |
73 |
124 |
8192000 |
|
2700 |
|
3413225 |
aiiYuu |
I |
March 27, 2013, 6:51 p.m. |
OK |
GNU C++ |
TESTS |
73 |
125 |
4403200 |
|
2700 |
|
2171890 |
TankEngineer |
I |
Sept. 15, 2012, 10:30 a.m. |
OK |
GNU C++ |
TESTS |
73 |
125 |
6348800 |
|
2700 |
|
3582315 |
numitus |
I |
April 20, 2013, 6:33 p.m. |
OK |
GNU C++ |
TESTS |
73 |
125 |
8089600 |
|
2700 |
|
163222 |
I-juice Nenash |
I |
Oct. 24, 2010, 11:39 a.m. |
OK |
GNU C++ |
TESTS |
73 |
140 |
9420800 |
|
2700 |
|
11270653 |
Amr_Hassan |
I |
May 25, 2015, 9:16 p.m. |
OK |
GNU C++ |
TESTS |
73 |
154 |
4300800 |
|
2700 |
|
10259660 |
aliasadiiii |
I |
March 13, 2015, 3:31 p.m. |
OK |
GNU C++0x |
TESTS |
73 |
374 |
12390400 |
|
2700 |
|
9801778 |
M.Mahdi |
I |
Feb. 11, 2015, 6:46 p.m. |
OK |
GNU C++0x |
TESTS |
73 |
404 |
11366400 |
|
2700 |
|
9800421 |
SAKT |
I |
Feb. 11, 2015, 4:02 p.m. |
OK |
GNU C++0x |
TESTS |
73 |
404 |
11366400 |
|
2700 |
|
17083226 |
freebsdx |
I |
April 1, 2016, 1:07 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
154 |
6348800 |
|
2700 |
|
57907533 |
lopare |
I |
July 28, 2019, 6:18 p.m. |
OK |
GNU C++11 |
TESTS |
73 |
156 |
4300800 |
|
2700 |
|
17220837 |
2016 |
I |
April 8, 2016, 2:52 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
156 |
5324800 |
|
2700 |
|
11959716 |
HellKitsune |
I |
July 7, 2015, 11:54 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
156 |
6963200 |
|
2700 |
|
19936309 |
Deemo |
I |
Aug. 17, 2016, 9:49 p.m. |
OK |
GNU C++11 |
TESTS |
73 |
218 |
13209600 |
|
2700 |
|
28316387 |
shengdebao |
I |
July 6, 2017, 5:02 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
342 |
10240000 |
|
2700 |
|
54495697 |
WOSHIGEPACHONG2 |
I |
May 22, 2019, 5:37 p.m. |
OK |
GNU C++11 |
TESTS |
73 |
778 |
6348800 |
|
2700 |
|
30239504 |
fan_hd |
I |
Sept. 10, 2017, 7:16 a.m. |
OK |
GNU C++11 |
TESTS |
73 |
810 |
6451200 |
|
2700 |
|
67579853 |
hpfdf ysyshtc |
I |
Dec. 25, 2019, 5:23 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
154 |
8294400 |
|
2700 |
|
56015372 |
sorry_im_smurfing |
I |
June 24, 2019, 8:44 p.m. |
OK |
GNU C++14 |
TESTS |
73 |
156 |
4403200 |
|
2700 |
|
48560494 |
Mandir_Wahi_Banayenge |
I |
Jan. 19, 2019, 7:09 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
156 |
6860800 |
|
2700 |
|
23377015 |
Ali.Pi |
I |
Dec. 28, 2016, 11:57 a.m. |
OK |
GNU C++14 |
TESTS |
73 |
186 |
6348800 |
|
2700 |
|
35469627 |
iqqsoszs |
I |
Feb. 19, 2018, 12:04 p.m. |
OK |
GNU C++14 |
TESTS |
73 |
186 |
9216000 |
|
2700 |
|
27914341 |
irkstepanov |
I |
June 19, 2017, 11:51 p.m. |
OK |
GNU C++14 |
TESTS |
73 |
312 |
11673600 |
|
2700 |
|
68373899 |
Skybytskyi.Nikita Latens |
I |
Jan. 7, 2020, 6:50 p.m. |
OK |
GNU C++17 |
TESTS |
73 |
154 |
4403200 |
|
2700 |
|
66502122 |
hjk1030 |
I |
Dec. 8, 2019, 12:57 p.m. |
OK |
GNU C++17 |
TESTS |
73 |
218 |
8396800 |
|
2700 |
|
37466905 |
ruo |
I |
April 19, 2018, 3:43 p.m. |
OK |
GNU C++17 |
TESTS |
73 |
374 |
17612800 |
|
2700 |
|
241819 |
MaxBuzz |
I |
Jan. 8, 2011, 4:22 a.m. |
OK |
Java 6 |
TESTS |
73 |
330 |
57036800 |
|
2700 |
|
469067 |
RAVEman |
I |
May 24, 2011, 9:53 a.m. |
OK |
Java 6 |
TESTS |
73 |
980 |
50380800 |
|
2700 |
|
45849533 |
Ahmad |
I |
Nov. 16, 2018, 9:55 p.m. |
OK |
Java 8 |
TESTS |
73 |
342 |
12185600 |
|
2700 |
|
163774 |
sdya Seyaua |
I |
Oct. 24, 2010, 1:26 p.m. |
OK |
MS C++ |
TESTS |
73 |
140 |
8601600 |
|
2700 |
|
164794 |
AleX |
I |
Oct. 31, 2010, 8:06 p.m. |
OK |
MS C++ |
TESTS |
73 |
140 |
9932800 |
|
2700 |
|
164060 |
KhaustovPavel eik0u kirr |
I |
Oct. 25, 2010, 4:47 a.m. |
OK |
MS C++ |
TESTS |
73 |
160 |
7987200 |
|
2700 |
|
163146 |
goo.gl_SsAhv 907th soundsdx |
I |
Oct. 24, 2010, 11:31 a.m. |
OK |
MS C++ |
TESTS |
73 |
160 |
8908800 |
|
2700 |
|
13195348 |
NVAL |
I |
Sept. 23, 2015, 8:59 p.m. |
OK |
MS C++ |
TESTS |
73 |
186 |
5222400 |
|
2700 |
|
163696 |
sdya Seyaua |
I |
Oct. 24, 2010, 12:39 p.m. |
OK |
MS C++ |
TESTS |
73 |
270 |
11776000 |
|
2700 |
remove filters
Back to search problems