Codeforces Round 583 (Div. 1 + Div. 2, based on Olympiad of Metropolises)

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
1214 Codeforces Round 583 (Div. 1 + Div. 2, based on Olympiad of Metropolises) FINISHED False 9000 169851287 Sept. 4, 2019, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2724 ) E Petya and Construction Set PROGRAMMING constructive algorithms graphs math sortings trees 2000

B'It 's Petya 's birthday party and his friends have presented him a brand new "Electrician- n " construction set, which they are sure he will enjoy as he always does with weird puzzles they give him. Construction set "Electrician- n " consists of 2n - 1 wires and 2n light bulbs. Each bulb has its own unique index that is an integer from 1 to 2n , while all wires look the same and are indistinguishable. In order to complete this construction set one has to use each of the wires to connect two distinct bulbs. We define a chain in a completed construction set as a sequence of distinct bulbs of length at least two, such that every two consecutive bulbs in this sequence are directly connected by a wire. Completed construction set configuration is said to be correct if a resulting network of bulbs and wires has a tree structure, i.e. any two distinct bulbs are the endpoints of some chain. Petya was assembling different configurations for several days, and he noticed that sometimes some of the bulbs turn on. After a series of experiments he came up with a conclusion that bulbs indexed 2i and 2i - 1 turn on if the chain connecting them consists of exactly d_i wires. Moreover, the following important condition holds: the value of d_i is never greater than n . Petya did his best but was not able to find a configuration that makes all bulbs to turn on, so he seeks your assistance. Please, find out a configuration that makes all bulbs shine. It is guaranteed that such configuration always exists. The first line of the input contains a single integer n ( 1 <= q n <= q 100 ,000 ) -- the parameter of a construction set that defines the number of bulbs and the number of wires. Next line contains n integers d_1, d_2, ldots, d_n ( 1 <= q d_i <= q n ), where d_i stands for the number of wires the chain between bulbs 2i and 2i - 1 should consist of. Print 2n - 1 lines'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62598652 zsz12251665 E Oct. 15, 2019, 3:55 a.m. OK FPC TESTS 68 624 1638400 2000
60475472 11235813213455 E Sept. 13, 2019, 7:52 a.m. OK GNU C++11 TESTS 68 46 3379200 2000
60052277 chenyewei_1234 E Sept. 5, 2019, 1:25 a.m. OK GNU C++11 TESTS 68 46 4710400 2000
62750293 Nihilism E Oct. 17, 2019, 12:41 a.m. OK GNU C++11 TESTS 68 46 7372800 2000
60168310 6thNOS E Sept. 6, 2019, 11:54 a.m. OK GNU C++11 TESTS 68 62 2457600 2000
60074880 6thNOS E Sept. 5, 2019, 12:18 p.m. OK GNU C++11 TESTS 68 62 2457600 2000
60075601 ningyuheng E Sept. 5, 2019, 12:29 p.m. OK GNU C++11 TESTS 68 62 4403200 2000
60031005 goodmorning200 E Sept. 4, 2019, 3:24 p.m. OK GNU C++11 TESTS 68 62 6451200 2000
60052304 chenyewei_1234 E Sept. 5, 2019, 1:26 a.m. OK GNU C++11 TESTS 68 62 6860800 2000
62750261 Nihilism E Oct. 17, 2019, 12:40 a.m. OK GNU C++11 TESTS 68 62 7372800 2000
61471008 fnoi16wjhui E Sept. 29, 2019, 12:20 p.m. OK GNU C++11 TESTS 68 62 12185600 2000
61344070 wleung_bvg E Sept. 27, 2019, 2:57 a.m. OK GNU C++14 TESTS 68 62 5222400 2000
61042044 Libitina E Sept. 22, 2019, 1:27 a.m. OK GNU C++14 TESTS 68 77 12390400 2000
60148627 Z3L5M E Sept. 6, 2019, 2:23 a.m. OK GNU C++14 TESTS 68 93 2457600 2000
61226768 vjudge1 E Sept. 24, 2019, 3:26 p.m. OK GNU C++14 TESTS 68 93 4812800 2000
60341523 DatVu E Sept. 10, 2019, 11:03 a.m. OK GNU C++14 TESTS 68 108 1638400 2000
60951438 jk89 E Sept. 20, 2019, 10:04 p.m. OK GNU C++14 TESTS 68 108 2355200 2000
60072196 TwentyOneHundredOrBust E Sept. 5, 2019, 11:30 a.m. OK GNU C++14 TESTS 68 108 3379200 2000
60473039 derrickball E Sept. 13, 2019, 6:38 a.m. OK GNU C++14 TESTS 68 108 5222400 2000
67456635 KawattaTaido E Dec. 23, 2019, 7:12 a.m. OK GNU C++14 TESTS 68 108 5632000 2000
60835572 cfjjs E Sept. 19, 2019, 8:51 a.m. OK GNU C++14 TESTS 68 108 6451200 2000
60225658 ALEZy E Sept. 7, 2019, 3:02 p.m. OK GNU C++17 TESTS 68 108 1228800 2000
60053042 Splashing E Sept. 5, 2019, 2:02 a.m. OK GNU C++17 TESTS 68 108 1638400 2000
60039218 yyzs123 E Sept. 4, 2019, 5:46 p.m. OK GNU C++17 TESTS 68 108 1638400 2000
61052177 yeeeet E Sept. 22, 2019, 6:53 a.m. OK GNU C++17 TESTS 68 108 2457600 2000
60211820 zcfinal E Sept. 7, 2019, 10:21 a.m. OK GNU C++17 TESTS 68 108 2457600 2000
60034182 wzw19991105 E Sept. 4, 2019, 4:15 p.m. OK GNU C++17 TESTS 68 108 2457600 2000
60519699 LowR E Sept. 14, 2019, 7:49 a.m. OK GNU C++17 TESTS 68 108 2662400 2000
60073643 AAATK E Sept. 5, 2019, 11:56 a.m. OK GNU C++17 TESTS 68 108 3174400 2000
60071656 yuxizi E Sept. 5, 2019, 11:19 a.m. OK GNU C++17 TESTS 68 108 3174400 2000
60238019 halohalo E Sept. 7, 2019, 7:28 p.m. OK GNU C++17 TESTS 68 108 4812800 2000
62106857 congbao E Oct. 8, 2019, 11:03 a.m. OK Go TESTS 68 826 11264000 2000
60007019 jdurie E Sept. 4, 2019, 10:43 a.m. OK Java 8 TESTS 68 233 0 2000
61268204 Leendertz E Sept. 25, 2019, 1:19 p.m. OK Java 8 TESTS 68 233 3481600 2000
60035860 SecondThread E Sept. 4, 2019, 4:45 p.m. OK Java 8 TESTS 68 233 4096000 2000
60017949 StayAwayFromBitches E Sept. 4, 2019, 12:28 p.m. OK Java 8 TESTS 68 234 4915200 2000
60293717 xodiac E Sept. 9, 2019, 8:53 a.m. OK Java 8 TESTS 68 234 11366400 2000
60059650 Nutella3000 E Sept. 5, 2019, 6:19 a.m. OK Java 8 TESTS 68 264 4505600 2000
60052385 gantushig21 E Sept. 5, 2019, 1:29 a.m. OK Java 8 TESTS 68 264 7577600 2000
60022564 uwi E Sept. 4, 2019, 1:25 p.m. OK Java 8 TESTS 68 265 16691200 2000
61085741 icpc_loser E Sept. 22, 2019, 6:16 p.m. OK Java 8 TESTS 68 265 21299200 2000
60009621 AryssonFigueiredo E Sept. 4, 2019, 10:58 a.m. OK Java 8 TESTS 68 280 0 2000
60031267 Benq E Sept. 4, 2019, 3:29 p.m. OK Kotlin TESTS 68 452 28774400 2000
60268590 vadimmm E Sept. 8, 2019, 2:27 p.m. OK Kotlin TESTS 68 467 32051200 2000
60010168 keymoon E Sept. 4, 2019, 11:02 a.m. OK Mono C# TESTS 68 296 33075200 2000
60025218 eki E Sept. 4, 2019, 2:02 p.m. OK Mono C# TESTS 68 779 26009600 2000
61777094 vjudge1 E Oct. 3, 2019, noon OK MS C++ TESTS 68 124 5632000 2000
60669606 lixiaofan E Sept. 16, 2019, 9:58 a.m. OK MS C++ TESTS 68 124 16076800 2000
61328694 zhangwen123 E Sept. 26, 2019, 2:23 p.m. OK MS C++ 2017 TESTS 68 124 5734400 2000
61328237 zhangwen123 E Sept. 26, 2019, 2:16 p.m. OK MS C++ 2017 TESTS 68 139 2560000 2000
60041910 AleksanderBalobanov E Sept. 4, 2019, 6:39 p.m. OK MS C++ 2017 TESTS 68 139 19660800 2000
60149153 Yanhui E Sept. 6, 2019, 2:44 a.m. OK MS C++ 2017 TESTS 68 140 1638400 2000
61344162 zhangwen123 E Sept. 27, 2019, 3:05 a.m. OK MS C++ 2017 TESTS 68 140 3379200 2000
60424637 tlnzldr E Sept. 12, 2019, 7:33 a.m. OK MS C++ 2017 TESTS 68 327 2457600 2000
60015191 Sorin1932 E Sept. 4, 2019, 11:31 a.m. OK MS C++ 2017 TESTS 68 343 3174400 2000
67474157 wp32pw E Dec. 23, 2019, 1:48 p.m. OK MS C++ 2017 TESTS 68 343 8908800 2000
62207400 kz20182726kz E Oct. 9, 2019, 1:35 p.m. OK MS C++ 2017 TESTS 68 966 1228800 2000
60346874 tonichoff E Sept. 10, 2019, 12:54 p.m. OK MS C++ 2017 TESTS 68 966 2764800 2000
65620002 Svlad_Cjelli E Nov. 24, 2019, 5:51 a.m. OK Ocaml TESTS 68 187 11264000 2000
65725779 Svlad_Cjelli E Nov. 25, 2019, 10:50 p.m. OK Ocaml TESTS 68 187 11264000 2000
65622951 Svlad_Cjelli E Nov. 24, 2019, 6:53 a.m. OK Ocaml TESTS 68 202 11264000 2000
65622371 Svlad_Cjelli E Nov. 24, 2019, 6:40 a.m. OK Ocaml TESTS 68 202 11264000 2000
61539870 zdbtxdy E Sept. 30, 2019, 8:18 a.m. OK PyPy 2 TESTS 68 483 14848000 2000
60013055 TheManTheMythTheLegend E Sept. 4, 2019, 11:19 a.m. OK PyPy 2 TESTS 68 529 22425600 2000
60078103 FireBird23 E Sept. 5, 2019, 1:09 p.m. OK PyPy 3 TESTS 68 608 12492800 2000
60077968 FireBird23 E Sept. 5, 2019, 1:07 p.m. OK PyPy 3 TESTS 68 608 12492800 2000
60077645 FireBird23 E Sept. 5, 2019, 1:02 p.m. OK PyPy 3 TESTS 68 608 12492800 2000
60439262 toho. E Sept. 12, 2019, 11:51 a.m. OK PyPy 3 TESTS 68 608 14233600 2000
60075971 tushartyagi8750 E Sept. 5, 2019, 12:35 p.m. OK PyPy 3 TESTS 68 623 14233600 2000
60011505 sonya123 E Sept. 4, 2019, 11:10 a.m. OK PyPy 3 TESTS 68 654 19660800 2000
62187184 LordVoIdebug E Oct. 9, 2019, 8:37 a.m. OK PyPy 3 TESTS 68 748 17100800 2000
60622248 lucaentremont E Sept. 15, 2019, 11:30 a.m. OK PyPy 3 TESTS 68 763 32665600 2000
60623275 lucaentremont E Sept. 15, 2019, 11:35 a.m. OK PyPy 3 TESTS 68 779 26624000 2000
60018888 nagitaosu E Sept. 4, 2019, 12:39 p.m. OK PyPy 3 TESTS 68 810 29081600 2000
60028779 bertrandovide E Sept. 4, 2019, 2:50 p.m. OK Python 2 TESTS 68 530 12800000 2000
60055722 MVP E Sept. 5, 2019, 3:59 a.m. OK Python 2 TESTS 68 577 19456000 2000
60155328 NocturneBflat E Sept. 6, 2019, 6:30 a.m. OK Python 3 TESTS 68 748 39321600 2000
60044578 sansen E Sept. 4, 2019, 7:46 p.m. OK Rust TESTS 68 78 6860800 2000
60850837 mjf E Sept. 19, 2019, 2 p.m. OK Rust TESTS 68 108 9216000 2000

remove filters

Back to search problems