Codeforces Round 168 (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
274 Codeforces Round 168 (Div. 1) FINISHED False 7200 383149800 Feb. 20, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1059 ) D Lovely Matrix PROGRAMMING dfs and similar graphs greedy sortings 2100

B"Lenny had an n xe2 x80 x89 xc3 x97 xe2 x80 x89m matrix of positive integers. He loved the matrix so much, because each row of the matrix was sorted in non-decreasing order. For the same reason he calls such matrices of integers lovely. One day when Lenny was at school his little brother was playing with Lenny's matrix in his room. He erased some of the entries of the matrix and changed the order of some of its columns. When Lenny got back home he was very upset. Now Lenny wants to recover his matrix. Help him to find an order for the columns of the matrix so that it's possible to fill in the erased entries of the matrix to achieve a lovely matrix again. Note, that you can fill the erased entries of the matrix with any integers. The first line of the input contains two positive integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xc2 xb7m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). Each of the next n lines contains m space-separated integers representing the matrix. An integer -1 shows an erased entry of the matrix. All other integers (each of them is between 0 and 109 inclusive) represent filled entries. If there exists no possible reordering of the columns print -1. Otherwise the output should contain m integers p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pm showing the sought permutation of columns. So, the first column of the lovely matrix will be p1-th column of the initial matrix, the second column of the lovely matrix will be p2-th column of the initial matrix and so on."...

Tutorials

Codeforces Round #168 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
3160160 Gassa D Feb. 20, 2013, 5:11 p.m. OK D TESTS 39 250 6041600 2100
3162332 Timur_Keks D Feb. 20, 2013, 6:09 p.m. OK Delphi TESTS 39 46 8806400 2100
3160876 Timur_Keks D Feb. 20, 2013, 5:20 p.m. OK Delphi TESTS 39 78 8806400 2100
3162775 con_nha_ngheo D Feb. 20, 2013, 6:27 p.m. OK FPC TESTS 39 31 10547200 2100
3172389 tsunayoshi D Feb. 22, 2013, 1:40 p.m. OK FPC TESTS 39 46 2457600 2100
3195431 ig_dug D Feb. 25, 2013, 3:30 p.m. OK FPC TESTS 39 46 4403200 2100
3173030 Alex_2oo8 D Feb. 22, 2013, 3:47 p.m. OK FPC TESTS 39 46 5632000 2100
3195237 ig_dug D Feb. 25, 2013, 2:43 p.m. OK FPC TESTS 39 46 18022400 2100
14043171 vjudge3 D Nov. 3, 2015, 2:35 p.m. OK FPC TESTS 39 340 6451200 2100
3204885 Isaacpei D Feb. 28, 2013, 4 a.m. OK GNU C++ TESTS 39 46 5939200 2100
3169311 al13pn D Feb. 21, 2013, 9:13 p.m. OK GNU C++ TESTS 39 46 7475200 2100
3174832 kunkun220189 D Feb. 23, 2013, 4:29 a.m. OK GNU C++ TESTS 39 46 10854400 2100
3175124 Psyduck43 D Feb. 23, 2013, 7:17 a.m. OK GNU C++ TESTS 39 46 11264000 2100
3164291 Swistakk D Feb. 20, 2013, 10:54 p.m. OK GNU C++ TESTS 39 46 17305600 2100
3158002 DamianS D Feb. 20, 2013, 4:43 p.m. OK GNU C++ TESTS 39 46 19558400 2100
3165688 LiJiancheng D Feb. 21, 2013, 7:04 a.m. OK GNU C++ TESTS 39 62 3584000 2100
3163185 ChuckLin2014 D Feb. 20, 2013, 7:04 p.m. OK GNU C++ TESTS 39 62 3686400 2100
3165742 LiJiancheng D Feb. 21, 2013, 7:13 a.m. OK GNU C++ TESTS 39 62 3993600 2100
3178044 sebastianclaici D Feb. 23, 2013, 10:50 p.m. OK GNU C++ TESTS 39 62 4300800 2100
3164256 stan D Feb. 20, 2013, 10:37 p.m. OK GNU C++0x TESTS 39 46 6758400 2100
4909733 yutaka1999 D Oct. 27, 2013, 6:46 a.m. OK GNU C++0x TESTS 39 46 7475200 2100
3205163 mrTux D Feb. 28, 2013, 6:16 a.m. OK GNU C++0x TESTS 39 46 10854400 2100
3162053 lonelyboy D Feb. 20, 2013, 6:01 p.m. OK GNU C++0x TESTS 39 62 2867200 2100
3163337 GuyUpLion D Feb. 20, 2013, 7:21 p.m. OK GNU C++0x TESTS 39 62 7680000 2100
5416847 niklasb D Dec. 12, 2013, 6:58 p.m. OK GNU C++0x TESTS 39 62 10137600 2100
3160419 boleyn.su D Feb. 20, 2013, 5:14 p.m. OK GNU C++0x TESTS 39 78 6041600 2100
3273731 pawelwa111 D March 10, 2013, 12:23 p.m. OK GNU C++0x TESTS 39 78 6451200 2100
3157931 MinakoKojima D Feb. 20, 2013, 4:42 p.m. OK GNU C++0x TESTS 39 78 6758400 2100
3179605 Riatre D Feb. 24, 2013, 9:45 a.m. OK GNU C++0x TESTS 39 78 9523200 2100
58675204 rainboy D Aug. 12, 2019, 4:13 p.m. OK GNU C11 TESTS 39 748 4812800 2100
58172216 wangyc D Aug. 2, 2019, 11:47 a.m. OK GNU C++11 TESTS 39 62 11264000 2100
18545662 rajat1603 D June 17, 2016, 3:15 p.m. OK GNU C++11 TESTS 39 92 5120000 2100
12294848 Xellos D July 31, 2015, 5:33 p.m. OK GNU C++11 TESTS 39 92 5836800 2100
18541676 gvaibhav22 D June 17, 2016, 11:39 a.m. OK GNU C++11 TESTS 39 92 6144000 2100
15194069 mtomic D Jan. 5, 2016, 5:37 p.m. OK GNU C++11 TESTS 39 92 6451200 2100
19412625 tommyricardo D July 26, 2016, 1:46 a.m. OK GNU C++11 TESTS 39 92 6553600 2100
16555346 I_love_chickpea D March 6, 2016, 5:03 p.m. OK GNU C++11 TESTS 39 92 6553600 2100
15194802 ltomic D Jan. 5, 2016, 6:51 p.m. OK GNU C++11 TESTS 39 92 6553600 2100
31231932 19992147 D Oct. 12, 2017, 4:30 a.m. OK GNU C++11 TESTS 39 92 6553600 2100
18731002 totsamyzed D June 26, 2016, 7:28 a.m. OK GNU C++11 TESTS 39 92 6860800 2100
61776886 shivsharmastr D Oct. 3, 2019, 11:56 a.m. OK GNU C++14 TESTS 39 92 5324800 2100
21403417 Pakalns D Oct. 13, 2016, 12:55 p.m. OK GNU C++14 TESTS 39 92 5529600 2100
27060411 Kerim.K D May 12, 2017, 6:28 p.m. OK GNU C++14 TESTS 39 92 6553600 2100
38979968 Shuvro77 D June 5, 2018, 10:27 p.m. OK GNU C++14 TESTS 39 92 7270400 2100
43730958 LucaSeri D Oct. 3, 2018, 2:06 p.m. OK GNU C++14 TESTS 39 92 7884800 2100
27598688 cr0n D June 5, 2017, 6:35 p.m. OK GNU C++14 TESTS 39 92 8089600 2100
34442520 akashdeep D Jan. 22, 2018, 10:14 a.m. OK GNU C++14 TESTS 39 92 8192000 2100
40420174 vjudge5 D July 16, 2018, 2:50 p.m. OK GNU C++14 TESTS 39 92 8192000 2100
56474357 vjudge4 D July 3, 2019, 12:31 p.m. OK GNU C++14 TESTS 39 92 8396800 2100
50914929 ANiuZY D March 7, 2019, 5:39 a.m. OK GNU C++14 TESTS 39 92 9216000 2100
61586160 fsociety00 D Oct. 1, 2019, 5:01 a.m. OK GNU C++17 TESTS 39 92 5836800 2100
40469116 Patti D July 17, 2018, 8:12 a.m. OK GNU C++17 TESTS 39 92 6553600 2100
66495088 AlexLuchianov D Dec. 8, 2019, 10:09 a.m. OK GNU C++17 TESTS 39 92 8192000 2100
50614510 ragen D Feb. 28, 2019, 6:43 p.m. OK GNU C++17 TESTS 39 92 8704000 2100
58576215 rapel D Aug. 11, 2019, 12:30 p.m. OK GNU C++17 TESTS 39 92 8908800 2100
50576412 AliShahali1382 D Feb. 27, 2019, 6:20 p.m. OK GNU C++17 TESTS 39 92 9216000 2100
50614519 Vahm D Feb. 28, 2019, 6:43 p.m. OK GNU C++17 TESTS 39 92 14848000 2100
69264422 amiralisalimi D Jan. 21, 2020, 6:07 p.m. OK GNU C++17 TESTS 39 122 7782400 2100
60279165 VodkaInTheJar D Sept. 8, 2019, 7:36 p.m. OK GNU C++17 TESTS 39 122 8704000 2100
42209684 _Ore_ D Aug. 28, 2018, 1:34 p.m. OK GNU C++17 TESTS 39 122 11776000 2100
3168038 uwi D Feb. 21, 2013, 3:06 p.m. OK Java 6 TESTS 39 140 204800 2100
3157479 ysyshtc D Feb. 20, 2013, 4:37 p.m. OK Java 6 TESTS 39 187 512000 2100
3424588 hiukim D March 30, 2013, 9:20 p.m. OK Java 6 TESTS 39 203 307200 2100
3174748 emo D Feb. 23, 2013, 3:25 a.m. OK Java 6 TESTS 39 281 15052800 2100
3176174 hama-du D Feb. 23, 2013, 12:51 p.m. OK Java 6 TESTS 39 437 17203200 2100
3173388 lazzrov D Feb. 22, 2013, 5:14 p.m. OK Java 6 TESTS 39 1250 512000 2100
3158472 Petr D Feb. 20, 2013, 4:49 p.m. OK Java 7 TESTS 39 187 307200 2100
3179998 S.Yesipenko D Feb. 24, 2013, 11:59 a.m. OK Java 7 TESTS 39 218 21196800 2100
5180151 miguelmaurizio D Nov. 20, 2013, 6:49 p.m. OK Java 7 TESTS 39 280 11980800 2100
3159123 FattyPenguin D Feb. 20, 2013, 4:57 p.m. OK Java 7 TESTS 39 343 43520000 2100
5171616 miguelmaurizio D Nov. 20, 2013, 6:09 a.m. OK Java 7 TESTS 39 404 6348800 2100
4080704 Dylan D July 16, 2013, 11:57 a.m. OK Java 7 TESTS 39 625 5734400 2100
4080631 Dylan D July 16, 2013, 11:41 a.m. OK Java 7 TESTS 39 625 16384000 2100
3200056 andrey_s D Feb. 26, 2013, 6:09 p.m. OK Java 7 TESTS 39 640 173875200 2100
3808310 shimomire D May 31, 2013, 5:36 p.m. OK Java 7 TESTS 39 1203 243302400 2100
14221111 AlexFetisov D Nov. 13, 2015, 2:04 a.m. OK Java 8 TESTS 39 404 15462400 2100
58675205 Dukkha D Aug. 12, 2019, 4:13 p.m. OK Java 8 TESTS 39 592 0 2100
42474060 PrakharJain D Sept. 4, 2018, 8:30 p.m. OK Java 8 TESTS 39 716 37580800 2100
3453124 mashinist D April 2, 2013, 2:36 p.m. OK Mono C# TESTS 39 390 20992000 2100
3161512 Merkurev D Feb. 20, 2013, 5:27 p.m. OK MS C++ TESTS 39 62 8192000 2100
3158107 rcx92 D Feb. 20, 2013, 4:44 p.m. OK MS C++ TESTS 39 62 8908800 2100
3160478 KhaustovPavel D Feb. 20, 2013, 5:15 p.m. OK MS C++ TESTS 39 78 5427200 2100
3162545 Monyura D Feb. 20, 2013, 6:16 p.m. OK MS C++ TESTS 39 78 8601600 2100
3154494 SergeyRogulenko D Feb. 20, 2013, 4:04 p.m. OK MS C++ TESTS 39 78 9830400 2100
3195078 problem-solved D Feb. 25, 2013, 2:05 p.m. OK MS C++ TESTS 39 78 10444800 2100
3159269 Milanin D Feb. 20, 2013, 4:59 p.m. OK MS C++ TESTS 39 78 11980800 2100
3179206 seen D Feb. 24, 2013, 8:17 a.m. OK MS C++ TESTS 39 78 12595200 2100
3579475 fatsheep_LF D April 20, 2013, 8:33 a.m. OK MS C++ TESTS 39 78 42291200 2100
4457643 Seyaua D Sept. 14, 2013, 12:16 p.m. OK MS C++ TESTS 39 92 8704000 2100
3170514 daidailanlan D Feb. 22, 2013, 5:32 a.m. OK Python 2 TESTS 39 578 13824000 2100
35856849 ______u______ D March 2, 2018, 8:28 p.m. OK Python 2 TESTS 39 810 18124800 2100
35856564 ______n______ D March 2, 2018, 8:22 p.m. OK Python 2 TESTS 39 810 18124800 2100
35856045 _____i_____ D March 2, 2018, 8:12 p.m. OK Python 2 TESTS 39 810 18124800 2100
35855984 _____k_____ D March 2, 2018, 8:11 p.m. OK Python 2 TESTS 39 810 18124800 2100
35847222 ______h______ D March 2, 2018, 4:40 p.m. OK Python 2 TESTS 39 810 18124800 2100
35847219 ______k______ D March 2, 2018, 4:40 p.m. OK Python 2 TESTS 39 810 18124800 2100
35844470 ______i______ D March 2, 2018, 3:30 p.m. OK Python 2 TESTS 39 810 18124800 2100
35842535 ______M______ D March 2, 2018, 2:55 p.m. OK Python 2 TESTS 39 810 18124800 2100
63984085 MinecraftFuns D Nov. 1, 2019, 11:12 a.m. OK Python 2 TESTS 39 904 13619200 2100

remove filters

Back to search problems