Codeforces Beta Round 54 (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
58 Codeforces Beta Round 54 (Div. 2) FINISHED False 7200 479916023 Jan. 31, 2011, 4 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 833 ) D Calendar PROGRAMMING greedy strings 2000

BerOilGasDiamondBank has branches in n cities, at that n is an even number. The bank management wants to publish a calendar with the names of all those cities written in two columns: the calendar should consist of exactly n / 2 lines of strictly equal length, each of which contains exactly two names and exactly one separator character between them. The name of every city should be used in the calendar exactly once. For historical reasons the symbol d is used as the separator of words in the calendar. The BerOilGasDiamondBank management wants to show that all its branches are equally important to it, that's why the order of their appearance in the calendar should be following: if we "glue"(concatinate) all the n / 2 calendar lines (from top to bottom) to make a single line, then the lexicographically minimal line is obtained. No separator character will be used to separate calendar lines. For example, if the lines are "bertown!berville", "newberville!bera", then the resulting line is "bertown!bervillenewberville!bera". In some sense one has to find the lexicographically minimal calendar, where the comparison of calendars happens line by line. Help BerOilGasDiamondBank and construct the required calendar. The first line contains an integer n ( 1 ≤ n ≤ 10 4 , n is even) which is the number of branches. Then follow n lines which are the names of the cities. All the names consist of lowercase Latin letters; their lengths are no less than 1 and no more than 10 symbols. The next line contains a single symbol d ( d has an ASCII-code from 33 to 126 inclusively, excluding lowercase Latin letters) which is the separator between words in the calendar lines. It is guaranteed that the calendar is possible to be constructed and all the names are different. Print n / 2 lines of similar length which are the required calendar. Every line should contain exactly two words and exactly one separator between them. If there are several solutions, print the lexicographically minim

Tutorials

Codeforces Beta Round #54 (Div.2) - разбор A-D

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40993134 ReaLNero1 D July 31, 2018, 1:47 a.m. OK GNU C++ TESTS 46 62 4505600 2000
35615458 White_Devil D Feb. 24, 2018, 5:24 a.m. OK GNU C++ TESTS 46 154 4915200 2000
35717308 Q612 D Feb. 26, 2018, 2:02 a.m. OK GNU C++ TESTS 46 186 2867200 2000
35680728 lqzhhh D Feb. 25, 2018, 1:17 p.m. OK GNU C++ TESTS 46 218 2355200 2000
59411169 rainboy D Aug. 24, 2019, 3:54 p.m. OK GNU C11 TESTS 46 92 204800 2000
54737038 MohamedSameh D May 28, 2019, 5:38 a.m. OK GNU C++11 TESTS 46 92 1024000 2000
35124435 McGinn D Feb. 10, 2018, 12:45 p.m. OK GNU C++11 TESTS 46 92 3276800 2000
36350062 astro_lion D March 17, 2018, 9:57 a.m. OK GNU C++11 TESTS 46 92 4710400 2000
36347647 astro_lion D March 17, 2018, 8:32 a.m. OK GNU C++11 TESTS 46 92 5324800 2000
54153765 jiangly D May 15, 2019, 2:44 a.m. OK GNU C++11 TESTS 46 92 17612800 2000
54496090 WOSHIGEPACHONG2 D May 22, 2019, 5:48 p.m. OK GNU C++11 TESTS 46 92 17612800 2000
46907337 Abdallah_Elshinbary D Dec. 11, 2018, 2:57 p.m. OK GNU C++11 TESTS 46 124 1126400 2000
50472511 fsh317574518 D Feb. 25, 2019, 2:41 a.m. OK GNU C++11 TESTS 46 124 1228800 2000
42820600 atharva_sarage D Sept. 13, 2018, 6:10 a.m. OK GNU C++11 TESTS 46 124 1740800 2000
38890324 Dr.Dendro D June 2, 2018, 12:24 p.m. OK GNU C++11 TESTS 46 124 5222400 2000
43946159 I_love_Y_UME D Oct. 7, 2018, 1:47 p.m. OK GNU C++14 TESTS 46 62 1024000 2000
46102929 Uzumaki_Narutoo D Nov. 23, 2018, 7:13 a.m. OK GNU C++14 TESTS 46 62 1024000 2000
39780881 satvik007 D June 29, 2018, 7:59 p.m. OK GNU C++14 TESTS 46 62 1638400 2000
35778266 0w1 D Feb. 28, 2018, 8:19 a.m. OK GNU C++14 TESTS 46 62 2764800 2000
55728342 master-mahmoudAcm D June 18, 2019, 7:08 p.m. OK GNU C++14 TESTS 46 92 1228800 2000
42863438 vjudge5 D Sept. 14, 2018, 2:10 p.m. OK GNU C++14 TESTS 46 92 1843200 2000
42254860 codechef_sucks D Aug. 29, 2018, 8:09 p.m. OK GNU C++14 TESTS 46 92 2048000 2000
42867474 Mr_Emrul D Sept. 14, 2018, 4:36 p.m. OK GNU C++14 TESTS 46 92 2150400 2000
37904342 mosta7il D May 5, 2018, 11:25 a.m. OK GNU C++14 TESTS 46 92 3993600 2000
66118557 NEZZ D Dec. 1, 2019, 10:01 a.m. OK GNU C++14 TESTS 46 92 8089600 2000
60663160 rareone0602 D Sept. 16, 2019, 6:19 a.m. OK GNU C++17 TESTS 46 62 204800 2000
59545278 Eran D Aug. 26, 2019, 9:19 p.m. OK GNU C++17 TESTS 46 62 1024000 2000
51259449 cauchyg D March 13, 2019, 12:44 p.m. OK GNU C++17 TESTS 46 92 819200 2000
41140820 OsamaFathy D Aug. 3, 2018, 2:44 a.m. OK GNU C++17 TESTS 46 92 819200 2000
65661162 danilserov D Nov. 24, 2019, 12:26 p.m. OK GNU C++17 TESTS 46 92 1126400 2000
58996448 alexOLO D Aug. 18, 2019, 11:37 a.m. OK GNU C++17 TESTS 46 92 1433600 2000
67141897 try_try19 D Dec. 18, 2019, 7:08 a.m. OK GNU C++17 TESTS 46 92 1433600 2000
49882418 Photon_ D Feb. 13, 2019, 6:52 p.m. OK GNU C++17 TESTS 46 92 1433600 2000
42860972 vjudge1 D Sept. 14, 2018, 12:51 p.m. OK GNU C++17 TESTS 46 92 2355200 2000
49862307 deadRabbit D Feb. 13, 2019, 10:12 a.m. OK GNU C++17 TESTS 46 92 14438400 2000
44338693 ViciousCoder D Oct. 15, 2018, 12:48 a.m. OK Java 8 TESTS 46 280 0 2000
41569373 Dobo_boy D Aug. 13, 2018, 7:57 p.m. OK Java 8 TESTS 46 310 0 2000
59411168 Dukkha D Aug. 24, 2019, 3:54 p.m. OK Java 8 TESTS 46 342 0 2000
35088469 Nesrin D Feb. 9, 2018, 11:56 a.m. OK Java 8 TESTS 46 374 20787200 2000
67845539 conjecture_xyz D Dec. 28, 2019, 9:22 p.m. OK PyPy 3 TESTS 46 810 10137600 2000
35895293 _____k_____ D March 3, 2018, 4:41 p.m. OK Python 2 TESTS 46 1090 5529600 2000
35894550 ______n______ D March 3, 2018, 4:24 p.m. OK Python 2 TESTS 46 1090 5529600 2000
35894311 ______u______ D March 3, 2018, 4:19 p.m. OK Python 2 TESTS 46 1090 5529600 2000
35894121 _____i_____ D March 3, 2018, 4:13 p.m. OK Python 2 TESTS 46 1090 5529600 2000
35885488 ______h______ D March 3, 2018, 1:29 p.m. OK Python 2 TESTS 46 1090 5529600 2000
35885090 ______k______ D March 3, 2018, 1:22 p.m. OK Python 2 TESTS 46 1090 5529600 2000
35884250 ______i______ D March 3, 2018, 1:09 p.m. OK Python 2 TESTS 46 1090 5529600 2000
35875225 ______M______ D March 3, 2018, 8:09 a.m. OK Python 2 TESTS 46 1090 5529600 2000
56016135 sorry_im_smurfing D June 24, 2019, 9:21 p.m. OK Python 2 TESTS 46 1152 921600 2000
66041897 neverlucky D Nov. 30, 2019, 1:49 p.m. OK Python 3 TESTS 46 342 1740800 2000
42156259 Mk_Python_v1 D Aug. 27, 2018, 2:54 p.m. OK Python 3 TESTS 46 404 512000 2000

remove filters

Back to search problems