Codeforces Round 272 (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
476 Codeforces Round 272 (Div. 2) FINISHED False 7200 318700799 Oct. 12, 2014, 2 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4685 ) D Dreamoon and Sets PROGRAMMING constructive algorithms greedy math 2000

B"Dreamoon likes to play with sets, integers and . is defined as the largest positive integer that divides both a and b. Let S be a set of exactly four distinct integers greater than 0. Define S to be of rank k if and only if for all pairs of distinct elements si, sj from S, . Given k and n, Dreamoon wants to make up n sets of rank k using integers from 1 to m such that no integer is used in two different sets (of course you can leave some integers without use). Calculate the minimum m that makes it possible and print one possible solution. The single line of the input contains two space separated integers n, k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910 xe2 x80 x89000, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100). On the first line print a single integer -- the minimal possible m. On each of the next n lines print four space separated integers representing the i-th set. Neither the order of the sets nor the order of integers within a set is important. If there are multiple possible solutions with minimal m, print any one of them. For the first example it's easy to see that set {1, xe2 x80 x892, xe2 x80 x893, xe2 x80 x894} isn't a valid set of rank 1 since ."...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
21993414 nguyenvu9405 D Nov. 2, 2016, 2:09 p.m. OK FPC TESTS 26 30 0 2000
15154497 tranuyen0302 D Jan. 2, 2016, 2:11 a.m. OK FPC TESTS 26 31 0 2000
41432008 TShT D Aug. 10, 2018, 1:07 p.m. OK FPC TESTS 26 31 0 2000
19882369 Gray_58 D Aug. 15, 2016, 7:31 a.m. OK FPC TESTS 26 31 1638400 2000
51365959 chaorenhaha D March 16, 2019, 9:38 a.m. OK FPC TESTS 26 46 0 2000
51365968 chaorenhaha D March 16, 2019, 9:38 a.m. OK FPC TESTS 26 155 819200 2000
26997060 vjudge5 D May 10, 2017, 1:27 p.m. OK GNU C++ TESTS 26 15 0 2000
20820739 akhil_27 D Sept. 22, 2016, 3:07 p.m. OK GNU C++ TESTS 26 15 0 2000
19566105 Saat D Aug. 1, 2016, 6:02 p.m. OK GNU C++ TESTS 26 15 0 2000
19203247 jzjNewBee D July 18, 2016, 6:12 a.m. OK GNU C++ TESTS 26 15 0 2000
29523071 vjudge4 D Aug. 17, 2017, 9:38 a.m. OK GNU C++ TESTS 26 15 0 2000
19198826 Ivan_w D July 18, 2016, 2:14 a.m. OK GNU C++ TESTS 26 15 0 2000
19186265 tjandbj D July 17, 2016, 7:53 a.m. OK GNU C++ TESTS 26 15 0 2000
18708464 bharat.khanna.cse14 D June 24, 2016, 7:19 p.m. OK GNU C++ TESTS 26 15 0 2000
18702442 ayush24 D June 24, 2016, 2:15 p.m. OK GNU C++ TESTS 26 15 0 2000
19202458 bingfeng D July 18, 2016, 5:42 a.m. OK GNU C++ TESTS 26 15 0 2000
62508754 luogu_bot1 D Oct. 13, 2019, 12:56 p.m. OK GNU C11 TESTS 26 46 0 2000
19613395 justHusam D Aug. 4, 2016, 10:36 a.m. OK GNU C++11 TESTS 26 15 0 2000
22235734 bluefi D Nov. 15, 2016, 5:02 p.m. OK GNU C++11 TESTS 26 15 0 2000
20476471 byene D Sept. 9, 2016, 10:51 a.m. OK GNU C++11 TESTS 26 15 0 2000
19608940 _sherlock D Aug. 4, 2016, 4:25 a.m. OK GNU C++11 TESTS 26 15 0 2000
19203543 weilining D July 18, 2016, 6:27 a.m. OK GNU C++11 TESTS 26 15 0 2000
19199849 1900 D July 18, 2016, 3:30 a.m. OK GNU C++11 TESTS 26 15 0 2000
18515889 tmt514 D June 16, 2016, 8:38 a.m. OK GNU C++11 TESTS 26 15 0 2000
16384177 apoorv_kulsh D Feb. 27, 2016, 1:54 p.m. OK GNU C++11 TESTS 26 15 0 2000
15589010 BlueFissure D Jan. 26, 2016, 8:09 a.m. OK GNU C++11 TESTS 26 15 0 2000
15328413 2014330300163 D Jan. 13, 2016, 8:54 a.m. OK GNU C++11 TESTS 26 15 0 2000
52456516 revpro D April 7, 2019, 11:57 a.m. OK GNU C++14 TESTS 26 15 0 2000
32330040 oToToT D Nov. 15, 2017, 11:32 a.m. OK GNU C++14 TESTS 26 15 0 2000
31829546 sharpblade95 D Oct. 28, 2017, 8:45 a.m. OK GNU C++14 TESTS 26 15 0 2000
30010441 I-Love-Islam D Sept. 2, 2017, 10:26 a.m. OK GNU C++14 TESTS 26 15 0 2000
29938980 _AjReme_ D Aug. 31, 2017, 9:27 a.m. OK GNU C++14 TESTS 26 15 0 2000
27688904 chinmay_sd D June 9, 2017, 12:26 p.m. OK GNU C++14 TESTS 26 15 0 2000
27669204 E_N_D D June 8, 2017, 10:47 a.m. OK GNU C++14 TESTS 26 15 0 2000
65799002 ForeverBrick D Nov. 27, 2019, 6:33 a.m. OK GNU C++14 TESTS 26 15 0 2000
54800054 Natsuhltk1 D May 29, 2019, 11:32 a.m. OK GNU C++14 TESTS 26 15 0 2000
31705109 DATVN D Oct. 25, 2017, 10:14 a.m. OK GNU C++14 TESTS 26 15 204800 2000
67394741 twangal D Dec. 21, 2019, 9:56 p.m. OK GNU C++17 TESTS 26 30 0 2000
67752094 m.hasan01 D Dec. 27, 2019, 6:08 p.m. OK GNU C++17 TESTS 26 30 0 2000
65577448 Rian_5900 D Nov. 23, 2019, 9:52 a.m. OK GNU C++17 TESTS 26 30 0 2000
63032260 xyz. D Oct. 20, 2019, 6:57 p.m. OK GNU C++17 TESTS 26 30 0 2000
59268002 smsm8111 D Aug. 22, 2019, 11:36 a.m. OK GNU C++17 TESTS 26 30 0 2000
53720556 Gabriel.Candeia D May 3, 2019, 10:39 p.m. OK GNU C++17 TESTS 26 30 0 2000
47309650 code_kika D Dec. 20, 2018, 6:52 p.m. OK GNU C++17 TESTS 26 30 0 2000
38595467 hunter_17 D May 24, 2018, 7:34 p.m. OK GNU C++17 TESTS 26 30 0 2000
41453211 SoGood D Aug. 11, 2018, 5:02 a.m. OK GNU C++17 TESTS 26 30 102400 2000
45505936 manish_joshi D Nov. 10, 2018, 10:31 a.m. OK GNU C++17 TESTS 26 30 204800 2000
13253858 xiaowuc1 D Sept. 27, 2015, 6:25 p.m. OK Java 7 TESTS 26 93 0 2000
15423413 Nirmit D Jan. 18, 2016, 7:53 a.m. OK Java 7 TESTS 26 108 0 2000
14781034 DukeOfYork D Dec. 13, 2015, 6:31 a.m. OK Java 7 TESTS 26 109 0 2000
16827548 niting112 D March 19, 2016, 9:01 p.m. OK Java 7 TESTS 26 358 39321600 2000
16827524 niting112 D March 19, 2016, 9 p.m. OK Java 7 TESTS 26 374 39526400 2000
68864922 yaoct D Jan. 15, 2020, 1:16 p.m. OK Java 8 TESTS 26 109 0 2000
31936841 flyman3046 D Nov. 1, 2017, 2:38 a.m. OK Java 8 TESTS 26 109 0 2000
61381722 Nutella3000 D Sept. 27, 2019, 5:41 p.m. OK Java 8 TESTS 26 124 0 2000
32187769 Omar_Morsi D Nov. 10, 2017, 7:08 a.m. OK Java 8 TESTS 26 124 0 2000
30752602 alibaba D Sept. 26, 2017, 1:49 p.m. OK Java 8 TESTS 26 124 0 2000
27509067 binary_eagle D June 1, 2017, 7:08 p.m. OK Java 8 TESTS 26 124 0 2000
23346893 _dp D Dec. 26, 2016, 7:04 p.m. OK Java 8 TESTS 26 124 20582400 2000
26109683 kunal_khatri D April 3, 2017, 10:33 p.m. OK Java 8 TESTS 26 124 20684800 2000
20660545 Hoda_Hisham D Sept. 16, 2016, 1:14 p.m. OK Java 8 TESTS 26 139 0 2000
32734653 step_by_step D Nov. 27, 2017, 8:19 p.m. OK Java 8 TESTS 26 139 20684800 2000
19205979 JokerQ D July 18, 2016, 7:55 a.m. OK MS C++ TESTS 26 15 0 2000
29278628 vjudge1 D Aug. 8, 2017, 6:12 a.m. OK MS C++ TESTS 26 15 2048000 2000
19201989 xkyrie D July 18, 2016, 5:24 a.m. OK MS C++ TESTS 26 15 4198400 2000
39019521 lkqlxjlxr71 D June 7, 2018, 12:08 p.m. OK MS C++ TESTS 26 30 0 2000
49137657 vjudge1 D Jan. 29, 2019, 8:33 a.m. OK MS C++ TESTS 26 31 0 2000
49137225 vjudge5 D Jan. 29, 2019, 8:20 a.m. OK MS C++ TESTS 26 31 0 2000
44933781 vjudge3 D Oct. 27, 2018, 3:56 a.m. OK MS C++ TESTS 26 31 0 2000
16729436 Our_Judge D March 15, 2016, 3:02 p.m. OK MS C++ TESTS 26 31 0 2000
16706551 BRAD_BIT D March 14, 2016, 12:46 a.m. OK MS C++ TESTS 26 31 0 2000
44933453 vjudge1 D Oct. 27, 2018, 3:39 a.m. OK MS C++ TESTS 26 31 307200 2000
59563667 CtrlAlt D Aug. 27, 2019, 9:45 a.m. OK MS C++ 2017 TESTS 26 46 409600 2000
17216754 Arpa D April 7, 2016, 5:20 p.m. OK PHP TESTS 26 46 4812800 2000
19068239 boombastic D July 13, 2016, 8:31 a.m. OK PyPy 2 TESTS 26 389 2764800 2000
21502168 boombastic chan_chan_man chariot D Oct. 16, 2016, 4:46 p.m. OK PyPy 2 TESTS 26 483 24064000 2000
53182868 alvaro9650 D April 23, 2019, 8:36 a.m. OK PyPy 3 TESTS 26 171 2867200 2000
33533185 ytz123 D Dec. 23, 2017, 10:07 a.m. OK Python 2 TESTS 26 78 4710400 2000
35874876 ______u______ D March 3, 2018, 8:03 a.m. OK Python 2 TESTS 26 93 4710400 2000
35874684 ______n______ D March 3, 2018, 7:57 a.m. OK Python 2 TESTS 26 93 4710400 2000
35874193 _____k_____ D March 3, 2018, 7:46 a.m. OK Python 2 TESTS 26 93 4710400 2000
35874046 _____i_____ D March 3, 2018, 7:42 a.m. OK Python 2 TESTS 26 93 4710400 2000
35870629 ______h______ D March 3, 2018, 6:34 a.m. OK Python 2 TESTS 26 93 4710400 2000
35870602 ______k______ D March 3, 2018, 6:33 a.m. OK Python 2 TESTS 26 93 4710400 2000
35864354 ______i______ D March 2, 2018, 11:07 p.m. OK Python 2 TESTS 26 93 4710400 2000
35862906 ______M______ D March 2, 2018, 10:35 p.m. OK Python 2 TESTS 26 93 4710400 2000
35147422 azala D Feb. 11, 2018, 9:13 a.m. OK Python 2 TESTS 26 124 9932800 2000
29263311 Seyed_Seyed D Aug. 7, 2017, 11:22 a.m. OK Python 3 TESTS 26 93 4710400 2000
32671301 darkkcyan D Nov. 26, 2017, 12:29 p.m. OK Python 3 TESTS 26 109 5632000 2000
66160715 NocturneBflat D Dec. 2, 2019, 4:12 a.m. OK Python 3 TESTS 26 139 2560000 2000
13514035 Hestia D Oct. 9, 2015, 4:55 p.m. OK Python 3 TESTS 26 140 102400 2000
28902329 pkien D July 26, 2017, 11:26 a.m. OK Python 3 TESTS 26 155 5120000 2000
32740788 bash D Nov. 28, 2017, 5:28 a.m. OK Python 3 TESTS 26 156 5836800 2000
50632690 MuhammedAbdalla D March 1, 2019, 10:01 a.m. OK Python 3 TESTS 26 170 512000 2000
63294646 zs__std D Oct. 24, 2019, 12:39 p.m. OK Python 3 TESTS 26 171 512000 2000
53764251 ahManoTravei D May 4, 2019, 9:29 p.m. OK Python 3 TESTS 26 171 512000 2000
60069871 __ACoder D Sept. 5, 2019, 10:45 a.m. OK Python 3 TESTS 26 187 512000 2000

remove filters

Back to search problems