Codeforces Beta Round 14 (Div. 2)

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
14 Codeforces Beta Round 14 (Div. 2) FINISHED False 7200 462810585 May 19, 2010, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4653 ) D Two Paths PROGRAMMING dfs and similar dp graphs shortest paths trees two pointers 2100

B"As you know, Bob's brother lives in Flatland. In Flatland there are n cities, connected by n xe2 x80 x89- xe2 x80 x891 two-way roads. The cities are numbered from 1 to n. You can get from one city to another moving along the roads. The xc2 xabTwo Paths xc2 xbb company, where Bob's brother works, has won a tender to repair two paths in Flatland. A path is a sequence of different cities, connected sequentially by roads. The company is allowed to choose by itself the paths to repair. The only condition they have to meet is that the two paths shouldn't cross (i.e. shouldn't have common cities). It is known that the profit, the xc2 xabTwo Paths xc2 xbb company will get, equals the product of the lengths of the two paths. Let's consider the length of each road equals 1, and the length of a path equals the amount of roads in it. Find the maximum possible profit for the company. The first line contains an integer n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200), where n is the amount of cities in the country. The following n xe2 x80 x89- xe2 x80 x891 lines contain the information about the roads. Each line contains a pair of numbers of the cities, connected by the road ai, xe2 x80 x89bi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Output the maximum possible profit."...

Tutorials

Codeforces Beta Round #14 tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
314631 eldar D March 3, 2011, 10:59 a.m. OK Delphi TESTS 45 30 921600 2100
64443 scenetree D June 1, 2010, 12:50 a.m. OK Delphi TESTS 45 30 6656000 2100
1770047 KaiZeR D June 7, 2012, 6:37 p.m. OK Delphi TESTS 45 30 9728000 2100
2454967 airon D Oct. 28, 2012, 8:09 a.m. OK Delphi TESTS 45 46 307200 2100
2454954 jokeD D Oct. 28, 2012, 8:06 a.m. OK Delphi TESTS 45 46 307200 2100
63490 PanZverski D May 19, 2010, 9:05 p.m. OK Delphi TESTS 45 60 1024000 2100
1115480 Fynn D Jan. 24, 2012, 7:04 p.m. OK Delphi TESTS 45 60 1228800 2100
2454962 airon D Oct. 28, 2012, 8:07 a.m. OK Delphi TESTS 45 62 307200 2100
314619 alik D March 3, 2011, 10:26 a.m. OK Delphi TESTS 45 80 1126400 2100
22141334 upfeed D Nov. 10, 2016, 3:52 a.m. OK Delphi TESTS 45 92 204800 2100
14420975 blackslender D Nov. 23, 2015, 2:46 a.m. OK FPC TESTS 45 30 102400 2100
14420958 blackslender D Nov. 23, 2015, 2:42 a.m. OK FPC TESTS 45 30 102400 2100
796036 nlbao D Oct. 26, 2011, 3:28 a.m. OK FPC TESTS 45 30 1024000 2100
794288 memphis0603 D Oct. 25, 2011, 1:18 a.m. OK FPC TESTS 45 30 1024000 2100
64521 cst D June 2, 2010, 9:36 a.m. OK FPC TESTS 45 30 1024000 2100
797361 Thanh_An-Hong D Oct. 26, 2011, 5:16 p.m. OK FPC TESTS 45 30 1228800 2100
792948 LifeKeeper D Oct. 24, 2011, 7:45 a.m. OK FPC TESTS 45 30 1228800 2100
14420778 xhunter1412 D Nov. 23, 2015, 1:56 a.m. OK FPC TESTS 45 30 1331200 2100
32373042 AsahiKasugano D Nov. 17, 2017, 8:40 a.m. OK FPC TESTS 45 30 1536000 2100
64547 nhok_kot D June 2, 2010, 5:55 p.m. OK FPC TESTS 45 30 4710400 2100
14010685 nickolaz D Nov. 1, 2015, 3:42 p.m. OK GNU C TESTS 45 30 102400 2100
13999396 mabb4722 D Nov. 1, 2015, 3:51 a.m. OK GNU C TESTS 45 30 102400 2100
13998668 GMX D Nov. 1, 2015, 2:48 a.m. OK GNU C TESTS 45 30 102400 2100
13998410 Paul100296 D Nov. 1, 2015, 2:23 a.m. OK GNU C TESTS 45 30 102400 2100
13996397 GregyFran D Oct. 31, 2015, 10:51 p.m. OK GNU C TESTS 45 30 102400 2100
13992989 gonza D Oct. 31, 2015, 8:06 p.m. OK GNU C TESTS 45 30 102400 2100
13992988 gonza D Oct. 31, 2015, 8:06 p.m. OK GNU C TESTS 45 30 102400 2100
13988467 BlueSword D Oct. 31, 2015, 6:04 p.m. OK GNU C TESTS 45 30 102400 2100
13961162 OchoaRodrigo D Oct. 30, 2015, 9:39 p.m. OK GNU C TESTS 45 30 102400 2100
13959101 blackman D Oct. 30, 2015, 7 p.m. OK GNU C TESTS 45 30 102400 2100
3365070 _Vadim_ D March 21, 2013, 12:28 p.m. OK GNU C++ TESTS 45 15 0 2100
2825216 Altynai D Dec. 25, 2012, 10:15 a.m. OK GNU C++ TESTS 45 15 0 2100
2824920 sd542927172 D Dec. 25, 2012, 8:17 a.m. OK GNU C++ TESTS 45 15 0 2100
2819688 ByeOrange D Dec. 23, 2012, 4:14 p.m. OK GNU C++ TESTS 45 15 0 2100
4138706 jimbo1qaz D July 23, 2013, 4:01 a.m. OK GNU C++ TESTS 45 15 102400 2100
4135944 PeterTong97 D July 22, 2013, 1:40 p.m. OK GNU C++ TESTS 45 15 102400 2100
4082389 bboy_drain D July 16, 2013, 7:37 p.m. OK GNU C++ TESTS 45 15 102400 2100
4068983 steven D July 14, 2013, 10:26 a.m. OK GNU C++ TESTS 45 15 102400 2100
4043876 x.bryanc D July 9, 2013, 7:08 p.m. OK GNU C++ TESTS 45 15 102400 2100
4031096 gotowork D July 6, 2013, 1:28 p.m. OK GNU C++ TESTS 45 15 102400 2100
3234766 lovefly1983 D March 3, 2013, 1:58 p.m. OK GNU C++0x TESTS 45 15 102400 2100
9735480 SaDDaS D Feb. 6, 2015, 10:22 a.m. OK GNU C++0x TESTS 45 30 0 2100
8036423 patrick.sava D Sept. 30, 2014, 1:14 p.m. OK GNU C++0x TESTS 45 30 102400 2100
6521478 marat.snowbear D May 2, 2014, 10:08 a.m. OK GNU C++0x TESTS 45 30 102400 2100
6861912 ranasaha D June 11, 2014, 1:44 a.m. OK GNU C++0x TESTS 45 30 204800 2100
6307463 EarlOfDitches D April 9, 2014, 6:02 p.m. OK GNU C++0x TESTS 45 30 204800 2100
1876253 killerdjo D July 8, 2012, 12:07 p.m. OK GNU C++0x TESTS 45 30 1536000 2100
9060343 kefaa D Dec. 9, 2014, 3:09 p.m. OK GNU C++0x TESTS 45 30 2355200 2100
9342686 vjudge5 D Jan. 2, 2015, 12:49 a.m. OK GNU C++0x TESTS 45 30 2560000 2100
9436808 fram D Jan. 15, 2015, 2:31 p.m. OK GNU C++0x TESTS 45 30 4608000 2100
31903111 hpkt.pkt D Oct. 30, 2017, 6:46 p.m. OK GNU C++11 TESTS 45 30 0 2100
31902067 hpkt.pkt D Oct. 30, 2017, 6:03 p.m. OK GNU C++11 TESTS 45 30 0 2100
30497389 nologic D Sept. 19, 2017, 12:36 p.m. OK GNU C++11 TESTS 45 30 0 2100
29994286 AboSalaah D Sept. 1, 2017, 5:38 p.m. OK GNU C++11 TESTS 45 30 0 2100
29731897 Pirlo21 D Aug. 24, 2017, 1:13 p.m. OK GNU C++11 TESTS 45 30 0 2100
27843050 Dalgerok D June 17, 2017, 9:47 a.m. OK GNU C++11 TESTS 45 30 0 2100
27209286 its_like_never_before D May 19, 2017, 7:05 a.m. OK GNU C++11 TESTS 45 30 0 2100
27193372 Undefined-VAR D May 18, 2017, 9:16 a.m. OK GNU C++11 TESTS 45 30 0 2100
27048608 Robbin.Ha D May 12, 2017, 7:01 a.m. OK GNU C++11 TESTS 45 30 0 2100
26882762 zq216991 D May 5, 2017, 2:30 p.m. OK GNU C++11 TESTS 45 30 0 2100
58472417 zhaoxiaoyun D Aug. 9, 2019, 1:19 a.m. OK GNU C++14 TESTS 45 30 0 2100
31141673 Stronger2020 D Oct. 8, 2017, 11:09 a.m. OK GNU C++14 TESTS 45 30 102400 2100
66642902 rakeshcodeit D Dec. 11, 2019, 3:27 p.m. OK GNU C++14 TESTS 45 30 204800 2100
46584152 vjudge1 D Dec. 4, 2018, 12:29 p.m. OK GNU C++14 TESTS 45 30 204800 2100
39540283 atlasworld D June 23, 2018, 11:43 a.m. OK GNU C++14 TESTS 45 30 204800 2100
39442225 Shivendra_420 D June 20, 2018, 5:09 p.m. OK GNU C++14 TESTS 45 30 204800 2100
32569380 ut48 D Nov. 23, 2017, 8:12 a.m. OK GNU C++14 TESTS 45 30 204800 2100
31986419 chinmay0906 D Nov. 2, 2017, 4:37 p.m. OK GNU C++14 TESTS 45 30 204800 2100
31919084 anisca22 D Oct. 31, 2017, 11:23 a.m. OK GNU C++14 TESTS 45 30 204800 2100
31064592 Stronger2020 D Oct. 6, 2017, 11:57 a.m. OK GNU C++14 TESTS 45 30 204800 2100
62360487 vjudge1 D Oct. 11, 2019, 12:20 p.m. OK GNU C++17 TESTS 45 30 102400 2100
53480362 kostia244 D April 28, 2019, 7:13 p.m. OK GNU C++17 TESTS 45 30 204800 2100
51397907 Mr.Gzj D March 17, 2019, 5:40 a.m. OK GNU C++17 TESTS 45 60 102400 2100
41957163 vsriram1012 D Aug. 22, 2018, 7:19 a.m. OK GNU C++17 TESTS 45 60 102400 2100
61887420 orochimaru001 D Oct. 5, 2019, 4:15 a.m. OK GNU C++17 TESTS 45 60 204800 2100
61787013 Cadenza D Oct. 3, 2019, 2:44 p.m. OK GNU C++17 TESTS 45 60 204800 2100
59851116 FailBetterNextTime D Sept. 1, 2019, 11:35 a.m. OK GNU C++17 TESTS 45 60 204800 2100
56022748 Mjgonzales D June 25, 2019, 5:01 a.m. OK GNU C++17 TESTS 45 60 204800 2100
50038791 mohnnad D Feb. 16, 2019, 11:09 p.m. OK GNU C++17 TESTS 45 60 204800 2100
47512606 anuragsingh804 D Dec. 26, 2018, 7:36 a.m. OK GNU C++17 TESTS 45 60 204800 2100
43920671 starius D Oct. 6, 2018, 10:46 p.m. OK Go TESTS 45 62 0 2100
65090 watashi D Dec. 29, 2010, 10:58 a.m. OK Haskell TESTS 45 50 1536000 2100
64100 ulandev D May 26, 2010, 5:40 p.m. OK Haskell TESTS 45 50 2048000 2100
64076 ulandev D May 26, 2010, 2:54 p.m. OK Haskell TESTS 45 250 2048000 2100
68494718 zhanyi_xiaolu D Jan. 10, 2020, 1 p.m. OK Java 11 TESTS 45 342 0 2100
63450 shindo D May 19, 2010, 6:57 p.m. OK Java 6 TESTS 45 80 33792000 2100
63228 ChuckNorris D May 19, 2010, 5:29 p.m. OK Java 6 TESTS 45 80 33792000 2100
63379 fetetriste D May 19, 2010, 6:06 p.m. OK Java 6 TESTS 45 90 33792000 2100
61910 alexey.enkov D May 19, 2010, 4:13 p.m. OK Java 6 TESTS 45 90 33792000 2100
2301648 yano0oyan D Oct. 5, 2012, 8:32 a.m. OK Java 6 TESTS 45 93 102400 2100
63301 bobloblaw D May 19, 2010, 5:38 p.m. OK Java 6 TESTS 45 110 33792000 2100
62546 mipt.vi002 D May 19, 2010, 4:46 p.m. OK Java 6 TESTS 45 110 33792000 2100
61871 KTO_XOM9K D May 19, 2010, 4:11 p.m. OK Java 6 TESTS 45 110 34099200 2100
529438 S.Yesipenko D July 6, 2011, 4:52 a.m. OK Java 6 TESTS 45 110 35123200 2100
64613 swcai D June 6, 2010, 7:40 a.m. OK Java 6 TESTS 45 110 42188800 2100
4802034 miguelmaurizio D Oct. 16, 2013, 3:12 a.m. OK Java 7 TESTS 45 124 0 2100
5196276 kylesky D Nov. 23, 2013, 5:37 a.m. OK Java 7 TESTS 45 124 102400 2100
4312503 laputawish D Aug. 19, 2013, 1:27 p.m. OK Java 7 TESTS 45 156 102400 2100
4312471 laputawish D Aug. 19, 2013, 1:17 p.m. OK Java 7 TESTS 45 156 102400 2100
4312460 laputawish D Aug. 19, 2013, 1:15 p.m. OK Java 7 TESTS 45 156 102400 2100
9375509 bendyna.ivan D Jan. 6, 2015, 8:03 p.m. OK Java 7 TESTS 45 186 0 2100
4310990 laputawish D Aug. 19, 2013, 5:38 a.m. OK Java 7 TESTS 45 186 102400 2100
10812238 dspstanky D April 21, 2015, 3:52 p.m. OK Java 7 TESTS 45 186 47411200 2100
9365781 bendyna.ivan D Jan. 5, 2015, 12:51 p.m. OK Java 7 TESTS 45 216 0 2100
4281359 Kazim D Aug. 15, 2013, 9:28 a.m. OK Java 7 TESTS 45 218 0 2100
55716942 StayAwayFromBitches D June 18, 2019, 1:11 p.m. OK Java 8 TESTS 45 186 3174400 2100
62630629 jenish9599 D Oct. 15, 2019, 3:20 p.m. OK Java 8 TESTS 45 186 3276800 2100
68630454 yaoct D Jan. 12, 2020, 2:27 a.m. OK Java 8 TESTS 45 186 3379200 2100
20828805 Dukkha D Sept. 23, 2016, 1:43 a.m. OK Java 8 TESTS 45 186 3481600 2100
46127638 aminul D Nov. 23, 2018, 8:18 p.m. OK Java 8 TESTS 45 186 3584000 2100
46127595 aminul D Nov. 23, 2018, 8:16 p.m. OK Java 8 TESTS 45 186 3584000 2100
46127476 aminul D Nov. 23, 2018, 8:11 p.m. OK Java 8 TESTS 45 186 3584000 2100
22616766 Wrong_Answer_Exceeded D Nov. 30, 2016, 8:16 a.m. OK Java 8 TESTS 45 186 3584000 2100
19608781 dhrumil140396 D Aug. 4, 2016, 4:07 a.m. OK Java 8 TESTS 45 186 3584000 2100
18070388 i_Love_Jaiman D May 25, 2016, 11:45 a.m. OK Java 8 TESTS 45 186 26112000 2100
64442 twa D May 31, 2010, 4:53 p.m. OK Mono C# TESTS 45 140 6246400 2100
498680 wrong D June 20, 2011, 10:53 a.m. OK Mono C# TESTS 45 170 5836800 2100
64441 twa D May 31, 2010, 4:38 p.m. OK Mono C# TESTS 45 200 6246400 2100
63491 Hadi_Asiaie D May 19, 2010, 9:05 p.m. OK Mono C# TESTS 45 1060 6246400 2100
24349696 og.kostya D Feb. 1, 2017, 4:23 p.m. OK MS C# TESTS 45 154 10752000 2100
24290586 Mem D Jan. 31, 2017, 1:07 p.m. OK MS C# TESTS 45 622 11980800 2100
23801662 pomjuice D Jan. 14, 2017, 8:39 a.m. OK MS C# TESTS 45 934 25804800 2100
18108255 azukun D May 26, 2016, 5:50 p.m. OK MS C# TESTS 45 936 12288000 2100
23801512 pomjuice D Jan. 14, 2017, 8:31 a.m. OK MS C# TESTS 45 1496 25702400 2100
2980382 nevets D Jan. 21, 2013, 4:56 p.m. OK MS C++ TESTS 45 15 102400 2100
2980380 stevil D Jan. 21, 2013, 4:56 p.m. OK MS C++ TESTS 45 15 102400 2100
2819258 lost3030 D Dec. 23, 2012, 1:37 p.m. OK MS C++ TESTS 45 15 102400 2100
4938350 Yarko D Oct. 30, 2013, 8:40 p.m. OK MS C++ TESTS 45 30 0 2100
16669334 vjudge2 D March 12, 2016, 8:55 a.m. OK MS C++ TESTS 45 30 0 2100
11522736 Roms D June 10, 2015, 2:29 p.m. OK MS C++ TESTS 45 30 0 2100
8241151 ibrahim_habib D Oct. 15, 2014, 8:22 p.m. OK MS C++ TESTS 45 30 0 2100
5461517 how_to_become_purple D Dec. 18, 2013, 3:03 p.m. OK MS C++ TESTS 45 30 0 2100
5348001 1106100011 D Dec. 4, 2013, 1:46 p.m. OK MS C++ TESTS 45 30 102400 2100
4683696 Barsuk_Alexey D Oct. 5, 2013, 9:40 p.m. OK MS C++ TESTS 45 30 102400 2100
55197873 codeshaker D June 6, 2019, 9:18 a.m. OK MS C++ 2017 TESTS 45 92 0 2100
62195475 Saber4096 D Oct. 9, 2019, 10:47 a.m. OK MS C++ 2017 TESTS 45 218 102400 2100
7665934 ShingRay D Sept. 2, 2014, 7:43 a.m. OK Ocaml TESTS 45 30 102400 2100
46399017 moss3s D Nov. 30, 2018, 11:19 a.m. OK PHP TESTS 45 124 512000 2100
64555737 noelcowm D Nov. 9, 2019, 3:33 a.m. OK PyPy 2 TESTS 45 498 7577600 2100
11887427 minimario D July 1, 2015, 8:15 p.m. OK PyPy 2 TESTS 45 1996 10035200 2100
11887418 minimario D July 1, 2015, 8:14 p.m. OK PyPy 2 TESTS 45 1996 10035200 2100
11887416 minimario D July 1, 2015, 8:13 p.m. OK PyPy 2 TESTS 45 1996 10035200 2100
11887407 minimario D July 1, 2015, 8:12 p.m. OK PyPy 2 TESTS 45 1996 10035200 2100
52433178 teitoku D April 7, 2019, 1:12 a.m. OK PyPy 3 TESTS 45 342 6041600 2100
32715818 yugle7 D Nov. 27, 2017, 1:16 p.m. OK PyPy 3 TESTS 45 434 30924800 2100
60367990 nagato1208 D Sept. 10, 2019, 10:38 p.m. OK PyPy 3 TESTS 45 466 9318400 2100
3473453 birdsman D April 4, 2013, 2:51 p.m. OK Python 2 TESTS 45 109 102400 2100
555027 DDDDDDDDDDDDDDDDDDDDDDDD D July 22, 2011, 10:59 a.m. OK Python 2 TESTS 45 110 2969600 2100
3473426 birdsman D April 4, 2013, 2:41 p.m. OK Python 2 TESTS 45 125 102400 2100
1970600 bene D Aug. 2, 2012, 10:17 a.m. OK Python 2 TESTS 45 170 3072000 2100
1948732 bene D July 29, 2012, 4:35 a.m. OK Python 2 TESTS 45 170 3072000 2100
3422080 nealzane D March 30, 2013, 8:31 a.m. OK Python 2 TESTS 45 187 102400 2100
30549568 hinhva D Sept. 20, 2017, 2:57 p.m. OK Python 2 TESTS 45 216 307200 2100
7887134 learner_cf D Sept. 20, 2014, 7:40 p.m. OK Python 2 TESTS 45 218 307200 2100
7886920 learner_cf D Sept. 20, 2014, 7:19 p.m. OK Python 2 TESTS 45 218 307200 2100
20786876 polphit D Sept. 21, 2016, 1:25 a.m. OK Python 2 TESTS 45 248 0 2100
11198347 darrensun D May 22, 2015, 7:06 a.m. OK Python 3 TESTS 45 248 307200 2100
55736658 Darshan1999 D June 19, 2019, 4:37 a.m. OK Python 3 TESTS 45 280 307200 2100
67252088 rraj78502 D Dec. 19, 2019, 7:37 p.m. OK Python 3 TESTS 45 310 307200 2100
46266441 ghoast D Nov. 27, 2018, 3:27 a.m. OK Ruby TESTS 45 218 0 2100
65045 watashi D Dec. 9, 2010, 11:17 a.m. OK Ruby TESTS 45 310 3174400 2100
65035 watashi D Dec. 9, 2010, 8:50 a.m. OK Ruby TESTS 45 330 3174400 2100
7352813 mysterion D Aug. 5, 2014, 1:15 p.m. OK Scala TESTS 45 466 102400 2100

remove filters

Back to search problems