Codeforces Round 319 (Div. 1)

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
576 Codeforces Round 319 (Div. 1) FINISHED False 7800 289920599 Sept. 10, 2015, 4:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3482 ) C Points on Plane PROGRAMMING constructive algorithms divide and conquer geometry greedy sortings 2300

B'On a plane are n points (xi, yi) with integer coordinates between 0 and 106. The distance between the two points with numbers a and b is said to be the following value: (the distance calculated by such formula is called Manhattan distance). We call a hamiltonian path to be some permutation pi of numbers from 1 to n. We say that the length of this path is value . Find some hamiltonian path with a length of no more than 25 xe2 x80 x89 xc3 x97 xe2 x80 x89108. Note that you do not have to minimize the path length. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). The i xe2 x80 x89+ xe2 x80 x891-th line contains the coordinates of the i-th point: xi and yi (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi, xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). It is guaranteed that no two points coincide. Print the permutation of numbers pi from 1 to n -- the sought Hamiltonian path. The permutation must meet the inequality . If there are multiple possible answers, print any of them. It is guaranteed that the answer exists. In the sample test the total distance is: (|5 xe2 x80 x89- xe2 x80 x893| xe2 x80 x89+ xe2 x80 x89|0 xe2 x80 x89- xe2 x80 x894|) xe2 x80 x89+ xe2 x80 x89(|3 xe2 x80 x89- xe2 x80 x890| xe2 x80 x89+ xe2 x80 x89|4 xe2 x80 x89- xe2 x80 x897|) xe2 x80 x89+ xe2 x80 x89(|0 xe2 x80 x89- xe2 x80 x898| xe2 x80 x89+ xe2 x80 x89|7 xe2 x80 x89- xe2 x80 x8910|) xe2 x80 x89+ xe2 x80 x89(|8 xe2 x80 x89- xe2 x80 x899| xe2 x80 x89+ xe2 x80 x89|10 xe2 x80 x89- xe2 x80 x8912|) xe2 x80 x89= xe2 x80 x892 xe2 x80 x89+ xe2 x80 x894 xe2 x80 x89+ xe2 x80 x893 xe2 x80 x89+ xe2 x80 x893 xe2 x80 x89+ xe2 x80 x898 xe2 x80 x89+ xe2 x80 x893 xe2 x80 x89+ xe2 x80 x891 xe2 x80 x89+ xe2 x80 x892 xe2 x80 x89= xe2 x80 x8926'...

Tutorials

Editorial Codeforces Round #319

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
12937320 Gassa C Sept. 10, 2015, 5:27 p.m. OK D TESTS 53 1232 44032000 2300
12961864 igdor99 C Sept. 11, 2015, 4:26 p.m. OK Delphi TESTS 53 529 13414400 2300
13137403 AHTuTTuTyX C Sept. 22, 2015, 8:38 a.m. OK Delphi TESTS 53 592 12083200 2300
13137383 AHTuTTuTyX C Sept. 22, 2015, 8:37 a.m. OK Delphi TESTS 53 607 12083200 2300
12931547 Alex_2oo8 C Sept. 10, 2015, 4:53 p.m. OK Delphi TESTS 53 794 11980800 2300
12936635 TheHedgehog C Sept. 10, 2015, 5:22 p.m. OK Delphi TESTS 53 920 14848000 2300
12951695 ruban C Sept. 11, 2015, 3:13 a.m. OK Delphi TESTS 53 1294 157286400 2300
17254403 hrazvan C April 9, 2016, 3:45 p.m. OK GNU C TESTS 53 826 14028800 2300
40986151 ReaLNero1 C July 30, 2018, 8:23 p.m. OK GNU C++ TESTS 53 248 12083200 2300
20775722 ZYF1024 C Sept. 20, 2016, 12:40 p.m. OK GNU C++ TESTS 53 248 26009600 2300
12954663 whn6325689 C Sept. 11, 2015, 7:47 a.m. OK GNU C++ TESTS 53 249 11980800 2300
18498228 vjtest C June 15, 2016, 1:24 p.m. OK GNU C++ TESTS 53 265 14233600 2300
13237649 immortalCO C Sept. 26, 2015, 2:35 p.m. OK GNU C++ TESTS 53 265 20480000 2300
18498214 jszyxw C June 15, 2016, 1:23 p.m. OK GNU C++ TESTS 53 280 14233600 2300
13471929 lgkm39 C Oct. 7, 2015, 11:33 a.m. OK GNU C++ TESTS 53 311 11980800 2300
31777954 vjudge5 C Oct. 27, 2017, 2:58 a.m. OK GNU C++ TESTS 53 311 15872000 2300
31973481 wzp233 C Nov. 2, 2017, 9:21 a.m. OK GNU C++ TESTS 53 312 12083200 2300
41647745 Scut82 C Aug. 16, 2018, 9:42 a.m. OK GNU C++ TESTS 53 327 11980800 2300
62390966 gsyz C Oct. 12, 2019, 2 a.m. OK GNU C++11 TESTS 53 264 16076800 2300
12943189 FatalEagle C Sept. 10, 2015, 6:11 p.m. OK GNU C++11 TESTS 53 265 11980800 2300
29702326 newgate C Aug. 23, 2017, 8:58 a.m. OK GNU C++11 TESTS 53 265 51916800 2300
40757953 vjudge5 C July 26, 2018, 1:19 a.m. OK GNU C++11 TESTS 53 295 12083200 2300
48478809 mmmod_lqs C Jan. 17, 2019, 4:53 a.m. OK GNU C++11 TESTS 53 296 32051200 2300
62391049 Algebra-hy C Oct. 12, 2019, 2:05 a.m. OK GNU C++11 TESTS 53 311 15872000 2300
62306626 vjudge1 C Oct. 10, 2019, 1:21 p.m. OK GNU C++11 TESTS 53 327 35123200 2300
40744576 Fuko_Ibuki C July 25, 2018, 2 p.m. OK GNU C++11 TESTS 53 343 12083200 2300
12948819 TaoSama C Sept. 10, 2015, 9:13 p.m. OK GNU C++11 TESTS 53 343 15564800 2300
31776379 SW_Wind C Oct. 27, 2017, 1:16 a.m. OK GNU C++11 TESTS 53 343 22732800 2300
20775727 ZYF1024 C Sept. 20, 2016, 12:41 p.m. OK GNU C++14 TESTS 53 249 26009600 2300
33488021 vjudge1 C Dec. 21, 2017, 6:19 p.m. OK GNU C++14 TESTS 53 343 64204800 2300
31776685 vjudge3 C Oct. 27, 2017, 1:38 a.m. OK GNU C++14 TESTS 53 358 46080000 2300
30754109 vjudge5 C Sept. 26, 2017, 2:46 p.m. OK GNU C++14 TESTS 53 390 12083200 2300
30753915 Sothan C Sept. 26, 2017, 2:38 p.m. OK GNU C++14 TESTS 53 420 12185600 2300
20775587 ZYF1024 C Sept. 20, 2016, 12:35 p.m. OK GNU C++14 TESTS 53 483 26112000 2300
31776574 zhzh2001 C Oct. 27, 2017, 1:30 a.m. OK GNU C++14 TESTS 53 561 22835200 2300
59652379 BlueDiamond C Aug. 29, 2019, 8:49 a.m. OK GNU C++14 TESTS 53 592 15667200 2300
45874955 KATATONIA C Nov. 17, 2018, 11:34 a.m. OK GNU C++14 TESTS 53 592 15974400 2300
31776607 vjudge2 C Oct. 27, 2017, 1:34 a.m. OK GNU C++14 TESTS 53 592 22835200 2300
55518682 chongryong C June 13, 2019, 7:07 a.m. OK GNU C++17 TESTS 53 265 12390400 2300
47784924 dmkozyrev C Dec. 31, 2018, 10:08 a.m. OK GNU C++17 TESTS 53 311 40243200 2300
47771113 dmkozyrev C Dec. 30, 2018, 9:16 p.m. OK GNU C++17 TESTS 53 311 40243200 2300
47770854 dmkozyrev C Dec. 30, 2018, 9:01 p.m. OK GNU C++17 TESTS 53 327 40243200 2300
39987283 3agwa C July 5, 2018, 2:31 p.m. OK GNU C++17 TESTS 53 592 15360000 2300
39987201 3agwa C July 5, 2018, 2:27 p.m. OK GNU C++17 TESTS 53 592 15667200 2300
53479600 AQT C April 28, 2019, 6:28 p.m. OK GNU C++17 TESTS 53 592 22220800 2300
69602837 super_aiderton C Jan. 27, 2020, 8:30 a.m. OK GNU C++17 TESTS 53 592 23654400 2300
59648069 anjn98 C Aug. 29, 2019, 6:54 a.m. OK GNU C++17 TESTS 53 607 15769600 2300
67977871 infinitepro C Dec. 30, 2019, 5:44 p.m. OK GNU C++17 TESTS 53 608 15667200 2300
18284281 behzad.nouri C June 7, 2016, 12:41 p.m. OK Haskell TESTS 53 1965 253030400 2300
12954272 the0u75ider C Sept. 11, 2015, 7:18 a.m. OK Java 7 TESTS 53 1091 78336000 2300
12936170 superspazz C Sept. 10, 2015, 5:20 p.m. OK Java 7 TESTS 53 1138 148480000 2300
12954317 the0u75ider C Sept. 11, 2015, 7:21 a.m. OK Java 7 TESTS 53 1154 78336000 2300
12954362 the0u75ider C Sept. 11, 2015, 7:24 a.m. OK Java 7 TESTS 53 1200 78336000 2300
12931590 mkirsche C Sept. 10, 2015, 4:53 p.m. OK Java 7 TESTS 53 1232 57548800 2300
12975575 HidenoriS C Sept. 12, 2015, 4:44 p.m. OK Java 7 TESTS 53 1294 84684800 2300
12938159 pashka C Sept. 10, 2015, 5:32 p.m. OK Java 7 TESTS 53 1309 13414400 2300
12931720 fromWork C Sept. 10, 2015, 4:54 p.m. OK Java 7 TESTS 53 1450 32563200 2300
12947638 Slamur C Sept. 10, 2015, 8:26 p.m. OK Java 7 TESTS 53 1559 178892800 2300
12961739 nitegazer C Sept. 11, 2015, 4:15 p.m. OK Java 7 TESTS 53 1606 100966400 2300
12930641 ilyakor C Sept. 10, 2015, 4:49 p.m. OK Java 8 TESTS 53 748 48947200 2300
16139567 dhrumil140396 C Feb. 18, 2016, 10:24 a.m. OK Java 8 TESTS 53 794 50892800 2300
12967842 hama-du C Sept. 12, 2015, 4:21 a.m. OK Java 8 TESTS 53 842 103321600 2300
13056347 beroul C Sept. 16, 2015, 9:55 p.m. OK Java 8 TESTS 53 889 54681600 2300
13005438 hiro116s C Sept. 15, 2015, 9:57 a.m. OK Java 8 TESTS 53 998 52531200 2300
13904873 miguelmaurizio C Oct. 27, 2015, 8:04 p.m. OK Java 8 TESTS 53 1106 54374400 2300
12975833 marcose18 C Sept. 12, 2015, 5:10 p.m. OK Java 8 TESTS 53 1107 102707200 2300
12960067 kenkoooo C Sept. 11, 2015, 2:02 p.m. OK Java 8 TESTS 53 1138 86220800 2300
12975886 marcose18 C Sept. 12, 2015, 5:15 p.m. OK Java 8 TESTS 53 1138 102707200 2300
13106251 dhwanilpatel C Sept. 19, 2015, 6:35 p.m. OK Java 8 TESTS 53 1138 102809600 2300
12956475 AnatolyTolstobrov C Sept. 11, 2015, 9:59 a.m. OK MS C# TESTS 53 1200 80076800 2300
12936800 og.kostya C Sept. 10, 2015, 5:23 p.m. OK MS C# TESTS 53 1231 41267200 2300
12930396 azukun C Sept. 10, 2015, 4:48 p.m. OK MS C# TESTS 53 1512 145817600 2300
12933025 Sunar C Sept. 10, 2015, 5:01 p.m. OK MS C++ TESTS 53 577 24780800 2300
12957155 chaoszh C Sept. 11, 2015, 10:53 a.m. OK MS C++ TESTS 53 592 17100800 2300
12944709 Oleg_Smirnov C Sept. 10, 2015, 6:21 p.m. OK MS C++ TESTS 53 592 24883200 2300
12938050 bayleef C Sept. 10, 2015, 5:32 p.m. OK MS C++ TESTS 53 592 24883200 2300
12935456 Ancient_mage C Sept. 10, 2015, 5:15 p.m. OK MS C++ TESTS 53 592 29593600 2300
12933164 Milanin C Sept. 10, 2015, 5:02 p.m. OK MS C++ TESTS 53 608 20787200 2300
40500273 vjudge3 C July 18, 2018, 5:45 a.m. OK MS C++ TESTS 53 608 24883200 2300
14834772 915507430 C Dec. 16, 2015, 1:25 p.m. OK MS C++ TESTS 53 608 29081600 2300
12941581 ilovetourist C Sept. 10, 2015, 5:57 p.m. OK MS C++ TESTS 53 623 35840000 2300
13130150 Carups C Sept. 21, 2015, 5:02 p.m. OK MS C++ TESTS 53 624 24883200 2300

remove filters

Back to search problems