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.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
475 | Bayan 2015 Contest Warm Up | FINISHED | False | 10800 | 319309199 | Oct. 5, 2014, 1 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 412 ) | E | Strongly Connected City 2 | PROGRAMMING | dfs and similar | 2600 |
B'Imagine a city with n junctions and m streets. Junctions are numbered from 1 to n. In order to increase the traffic flow, mayor of the city has decided to make each street one-way. This means in the street between junctions u and v, the traffic moves only from u to v or only from v to u. The problem is to direct the traffic flow of streets in a way that maximizes the number of pairs (u, xe2 x80 x89v) where 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89u, xe2 x80 x89v xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n and it is possible to reach junction v from u by passing the streets in their specified direction. Your task is to find out maximal possible number of such pairs. The first line of input contains integers n and m, (), denoting the number of junctions and streets of the city. Each of the following m lines contains two integers u and v, (u xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89v), denoting endpoints of a street in the city. Between every two junctions there will be at most one street. It is guaranteed that before mayor decision (when all streets were two-way) it was possible to reach each junction from any other junction. Print the maximal number of pairs (u, xe2 x80 x89v) such that that it is possible to reach junction v from u after directing the streets. In the first sample, if the mayor makes first and second streets one-way towards the junction 1 and third and fourth streets in opposite direction, there would be 13 pairs of reachable junctions: {(1, xe2 x80 x891), xe2 x80 x89(2, xe2 x80 x892), xe2 x80 x89(3, xe2 x80 x893), xe2 x80 x89(4, xe2 x80 x894), xe2 x80 x89(5, xe2 x80 x895), xe2 x80 x89(2, xe2 x80 x891), xe2 x80 x89(3, xe2 x80 x891), xe2 x80 x89(1, xe2 x80 x894), xe2 x80 x89(1, xe2 x80 x895), xe2 x80 x89(2, xe2 x80 x894), xe2 x80 x89(2, xe2 x80 x895), xe2 x80 x89(3, xe2 x80 x894), xe2 x80 x89(3, xe2 x80 x895)}'... |
Bayan 2015 Contest Warm Up Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
22400594 | s34vv1nd | E | Nov. 22, 2016, 10:15 a.m. | OK | FPC | TESTS | 112 | 78 | 36556800 | 2600 | |
26528142 | zhan8855 | E | April 21, 2017, 12:12 a.m. | OK | GNU C++ | TESTS | 112 | 30 | 122265600 | 2600 | |
31972962 | Scut82 | E | Nov. 2, 2017, 9:01 a.m. | OK | GNU C++ | TESTS | 112 | 31 | 20070400 | 2600 | |
8138281 | suiyuan2009 | E | Oct. 8, 2014, 10:07 a.m. | OK | GNU C++ | TESTS | 112 | 46 | 8089600 | 2600 | |
40987817 | ReaLNero1 | E | July 30, 2018, 9:30 p.m. | OK | GNU C++ | TESTS | 112 | 46 | 20070400 | 2600 | |
13925744 | 130705009 | E | Oct. 29, 2015, 2:37 a.m. | OK | GNU C++ | TESTS | 112 | 46 | 32153600 | 2600 | |
8092619 | Dmitry_Egorov | E | Oct. 5, 2014, 2:32 p.m. | OK | GNU C++ | TESTS | 112 | 61 | 7475200 | 2600 | |
22633808 | 12190140 | E | Dec. 1, 2016, 1:51 a.m. | OK | GNU C++ | TESTS | 112 | 61 | 7884800 | 2600 | |
9008975 | GragonRaja | E | Dec. 7, 2014, 11:40 a.m. | OK | GNU C++ | TESTS | 112 | 61 | 7987200 | 2600 | |
8113673 | Apple_Cplus | E | Oct. 6, 2014, 4:10 p.m. | OK | GNU C++ | TESTS | 112 | 61 | 8908800 | 2600 | |
10338074 | Dylans | E | March 18, 2015, 1:37 p.m. | OK | GNU C++ | TESTS | 112 | 61 | 32153600 | 2600 | |
9299048 | Xellos | E | Dec. 29, 2014, 3:04 p.m. | OK | GNU C++0x | TESTS | 112 | 46 | 3993600 | 2600 | |
8099712 | ifsmirnov | E | Oct. 5, 2014, 9:03 p.m. | OK | GNU C++0x | TESTS | 112 | 62 | 20480000 | 2600 | |
8099515 | ecnerwala | E | Oct. 5, 2014, 8:32 p.m. | OK | GNU C++0x | TESTS | 112 | 62 | 20582400 | 2600 | |
8105889 | zshi | E | Oct. 6, 2014, 12:35 p.m. | OK | GNU C++0x | TESTS | 112 | 62 | 63078400 | 2600 | |
8093250 | hogloid | E | Oct. 5, 2014, 2:44 p.m. | OK | GNU C++0x | TESTS | 112 | 77 | 16384000 | 2600 | |
9973464 | Amor727 | E | Feb. 23, 2015, 8:04 p.m. | OK | GNU C++0x | TESTS | 112 | 77 | 39936000 | 2600 | |
9973457 | Amor727 | E | Feb. 23, 2015, 8:03 p.m. | OK | GNU C++0x | TESTS | 112 | 77 | 39936000 | 2600 | |
8709684 | aliasadiiii | E | Nov. 16, 2014, 8:56 a.m. | OK | GNU C++0x | TESTS | 112 | 78 | 7884800 | 2600 | |
8445508 | zhj | E | Oct. 28, 2014, 2:26 a.m. | OK | GNU C++0x | TESTS | 112 | 78 | 8396800 | 2600 | |
8508423 | yummy | E | Nov. 1, 2014, 5:43 a.m. | OK | GNU C++0x | TESTS | 112 | 78 | 14028800 | 2600 | |
45416793 | weng_233 | E | Nov. 7, 2018, 2:43 p.m. | OK | GNU C++11 | TESTS | 112 | 61 | 96563200 | 2600 | |
42766755 | KMAASZRAA | E | Sept. 11, 2018, 1:33 p.m. | OK | GNU C++11 | TESTS | 112 | 62 | 3481600 | 2600 | |
10818660 | a00012025 | E | April 22, 2015, 4:17 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 5836800 | 2600 | |
21588447 | Just_Be_The_Alchemist | E | Oct. 19, 2016, 10:27 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 5939200 | 2600 | |
19892187 | Deemo | E | Aug. 15, 2016, 4:39 p.m. | OK | GNU C++11 | TESTS | 112 | 62 | 24064000 | 2600 | |
45432726 | Memory_of_winter | E | Nov. 8, 2018, 5:37 a.m. | OK | GNU C++11 | TESTS | 112 | 62 | 32358400 | 2600 | |
17158879 | freebsdx | E | April 4, 2016, 2:08 p.m. | OK | GNU C++11 | TESTS | 112 | 62 | 34304000 | 2600 | |
22396090 | Minology | E | Nov. 22, 2016, 3:40 a.m. | OK | GNU C++11 | TESTS | 112 | 77 | 3891200 | 2600 | |
54821669 | xielinhan | E | May 30, 2019, 3:24 a.m. | OK | GNU C++11 | TESTS | 112 | 77 | 32358400 | 2600 | |
12243133 | polequoll | E | July 27, 2015, 5:02 p.m. | OK | GNU C++11 | TESTS | 112 | 78 | 3993600 | 2600 | |
25223807 | vjudge4 | E | March 4, 2017, 6:15 p.m. | OK | GNU C++14 | TESTS | 112 | 62 | 34099200 | 2600 | |
42718446 | ArshiaDadras | E | Sept. 9, 2018, 9:11 p.m. | OK | GNU C++14 | TESTS | 112 | 77 | 3891200 | 2600 | |
42718061 | ArshiaDadras | E | Sept. 9, 2018, 8:51 p.m. | OK | GNU C++14 | TESTS | 112 | 78 | 8089600 | 2600 | |
37577804 | tieunhi | E | April 24, 2018, 4:01 p.m. | OK | GNU C++14 | TESTS | 112 | 78 | 23449600 | 2600 | |
58407932 | 860579 | E | Aug. 6, 2019, 10:26 p.m. | OK | GNU C++14 | TESTS | 112 | 93 | 4300800 | 2600 | |
27123854 | Took | E | May 15, 2017, 2:37 p.m. | OK | GNU C++14 | TESTS | 112 | 93 | 7680000 | 2600 | |
37563313 | MightyToMo | E | April 24, 2018, 3:54 a.m. | OK | GNU C++14 | TESTS | 112 | 93 | 8908800 | 2600 | |
24888132 | xuanquang1999 | E | Feb. 22, 2017, 8:34 a.m. | OK | GNU C++14 | TESTS | 112 | 93 | 9932800 | 2600 | |
29962552 | victoragnez | E | Sept. 1, 2017, 1:36 a.m. | OK | GNU C++14 | TESTS | 112 | 93 | 10547200 | 2600 | |
22589505 | ko_osaga | E | Nov. 29, 2016, 1:15 a.m. | OK | GNU C++14 | TESTS | 112 | 93 | 16486400 | 2600 | |
48402557 | AliShahali1382 | E | Jan. 14, 2019, 11:07 p.m. | OK | GNU C++17 | TESTS | 112 | 77 | 3993600 | 2600 | |
48402605 | AliShahali1382 | E | Jan. 14, 2019, 11:13 p.m. | OK | GNU C++17 | TESTS | 112 | 77 | 4300800 | 2600 | |
62874126 | hjk1030 | E | Oct. 18, 2019, 2:44 p.m. | OK | GNU C++17 | TESTS | 112 | 78 | 3993600 | 2600 | |
49543300 | eisen_shinzou | E | Feb. 6, 2019, 7:52 p.m. | OK | GNU C++17 | TESTS | 112 | 78 | 7475200 | 2600 | |
48402525 | AliShahali1382 | E | Jan. 14, 2019, 11:04 p.m. | OK | GNU C++17 | TESTS | 112 | 93 | 3788800 | 2600 | |
60750937 | ruo | E | Sept. 18, 2019, 6:14 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 3993600 | 2600 | |
51559768 | WizWalnut | E | March 20, 2019, 7:29 a.m. | OK | GNU C++17 | TESTS | 112 | 93 | 15155200 | 2600 | |
51559594 | WizWalnut | E | March 20, 2019, 7:26 a.m. | OK | GNU C++17 | TESTS | 112 | 109 | 15155200 | 2600 | |
69712114 | ParsaBahrami | E | Jan. 29, 2020, 7:29 a.m. | OK | GNU C++17 | TESTS | 112 | 109 | 231833600 | 2600 | |
51559055 | WizWalnut | E | March 20, 2019, 7:10 a.m. | OK | GNU C++17 | TESTS | 112 | 139 | 15155200 | 2600 | |
8336554 | uwi | E | Oct. 21, 2014, 2:15 a.m. | OK | Java 7 | TESTS | 112 | 93 | 102400 | 2600 | |
8097125 | NaoMeir | E | Oct. 5, 2014, 4:55 p.m. | OK | Java 7 | TESTS | 112 | 124 | 0 | 2600 | |
8333378 | uwi | E | Oct. 20, 2014, 4:50 p.m. | OK | Java 7 | TESTS | 112 | 186 | 102400 | 2600 | |
8289917 | uwi | E | Oct. 18, 2014, 6:17 a.m. | OK | Java 7 | TESTS | 112 | 186 | 204800 | 2600 | |
8290282 | uwi | E | Oct. 18, 2014, 6:55 a.m. | OK | Java 7 | TESTS | 112 | 202 | 204800 | 2600 | |
8102661 | dnk | E | Oct. 6, 2014, 8:11 a.m. | OK | Java 7 | TESTS | 112 | 311 | 204800 | 2600 | |
10390264 | PlayLikeNeverB4 | E | March 21, 2015, 11:23 p.m. | OK | Java 7 | TESTS | 112 | 327 | 12697600 | 2600 | |
9550589 | _rabbit | E | Jan. 25, 2015, 3:09 p.m. | OK | Java 7 | TESTS | 112 | 685 | 4710400 | 2600 | |
11337983 | Amr_Hassan | E | May 28, 2015, 7:26 p.m. | OK | Java 7 | TESTS | 112 | 701 | 4710400 | 2600 | |
8107360 | Nero | E | Oct. 6, 2014, 3:06 p.m. | OK | Java 7 | TESTS | 112 | 717 | 5120000 | 2600 | |
8488459 | old_arysson | E | Oct. 30, 2014, 4 p.m. | OK | Java 8 | TESTS | 112 | 296 | 2355200 | 2600 | |
8488405 | Pimpom | E | Oct. 30, 2014, 3:57 p.m. | OK | Java 8 | TESTS | 112 | 296 | 2355200 | 2600 | |
8290290 | uwi | E | Oct. 18, 2014, 6:55 a.m. | OK | Java 8 | TESTS | 112 | 342 | 2252800 | 2600 | |
8091812 | VArtem | E | Oct. 5, 2014, 2:15 p.m. | OK | Java 8 | TESTS | 112 | 452 | 1638400 | 2600 | |
8097472 | zanoes | E | Oct. 5, 2014, 5:07 p.m. | OK | MS C++ | TESTS | 112 | 124 | 35430400 | 2600 | |
8096584 | RomaWhite | E | Oct. 5, 2014, 3:58 p.m. | OK | MS C++ | TESTS | 112 | 171 | 3584000 | 2600 | |
8096354 | sdya | E | Oct. 5, 2014, 3:55 p.m. | OK | MS C++ | TESTS | 112 | 202 | 61030400 | 2600 |
Back to search problems