Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov!

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
1340 Codeforces Round 637 (Div. 1) - Thanks, Ivan Belonogov! FINISHED False 9000 149699711 April 23, 2020, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7913 ) B Nastya and Scoreboard PROGRAMMING bitmasks dp greedy

B' Denis, after buying flowers and sweets (you will learn about this story in the next task), went to a date with Nastya to ask her to become a couple. Now, they are sitting in the cafe and finally... Denis asks her to be together, but ... Nastya doesn 't give any answer. The poor boy was very upset because of that. He was so sad that he punched some kind of scoreboard with numbers. The numbers are displayed in the same way as on an electronic clock: each digit position consists of 7 segments, which can be turned on or off to display different numbers. The picture shows how all 10 decimal digits are displayed: After the punch, some segments stopped working, that is, some segments might stop glowing if they glowed earlier. But Denis remembered how many sticks were glowing and how many are glowing now. Denis broke exactly k segments and he knows which sticks are working now. Denis came up with the question: what is the maximum possible number that can appear on the board if you turn on exactly k sticks (which are off now)? It is allowed that the number includes leading zeros. The first line contains integer n (1 <= q n <= q 2000) -- the number of digits on scoreboard and k (0 <= q k <= q 2000) -- the number of segments that stopped working. The next n lines contain one binary string of length 7 , the i -th of which encodes the i -th digit of the scoreboard. Each digit on the scoreboard consists of 7 segments. We number them, as in the picture below, and let the i -th place of the binary string be 0 if the i -th stick is not glowing and 1 if it is glowing. Then a binary string of length 7 will specify which segments are glowing now. Thus, the sequences "1110111", "0010010", "1011101", "1011011", "0111010", "1101011", "1101111", "1010010", "1111111", "1111011" encode in sequence all digits from 0 to 9 inclusive. Output a single number consis'...

Tutorials

Codeforces Round #637 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
77786482 Gassa B April 23, 2020, 3:03 p.m. OK D TESTS 24 61 4300800
77780963 hos.lyric B April 23, 2020, 2:58 p.m. OK D TESTS 24 93 13721600
77803831 physics0523 B April 23, 2020, 3:26 p.m. OK GNU C11 TESTS 24 61 28364800
77811524 Lenstar B April 23, 2020, 3:40 p.m. OK GNU C++11 TESTS 24 30 819200
77819329 ol1v3r B April 23, 2020, 3:55 p.m. OK GNU C++11 TESTS 24 31 307200
77809530 tlnllkbp B April 23, 2020, 3:36 p.m. OK GNU C++11 TESTS 24 31 614400
77793462 msuwakow B April 23, 2020, 3:12 p.m. OK GNU C++11 TESTS 24 31 614400
77897976 just_soso B April 24, 2020, 9:24 a.m. OK GNU C++11 TESTS 32 31 614400
77787947 wzp666 B April 23, 2020, 3:05 p.m. OK GNU C++11 TESTS 24 31 716800
77811024 JustinRochester B April 23, 2020, 3:39 p.m. OK GNU C++11 TESTS 24 31 1126400
77796283 Chtholly_Froggy B April 23, 2020, 3:15 p.m. OK GNU C++11 TESTS 24 31 4096000
77784832 watermelon_tree B April 23, 2020, 3:02 p.m. OK GNU C++11 TESTS 24 31 4096000
77826405 cy1999 B April 23, 2020, 4:10 p.m. OK GNU C++11 TESTS 24 31 4096000
77822924 Choni3 B April 23, 2020, 4:02 p.m. OK GNU C++14 TESTS 24 15 307200
77815323 antguz B April 23, 2020, 3:47 p.m. OK GNU C++14 TESTS 24 15 512000
77927568 Anton_Roy B April 24, 2020, 3:10 p.m. OK GNU C++14 TESTS 33 30 614400
77819352 rajdetroja B April 23, 2020, 3:55 p.m. OK GNU C++14 TESTS 24 31 0
77835583 arjitkansal B April 23, 2020, 4:31 p.m. OK GNU C++14 TESTS 24 31 0
77797225 Sevlll B April 23, 2020, 3:17 p.m. OK GNU C++14 TESTS 24 31 102400
77815398 NOOBxCODER B April 23, 2020, 3:47 p.m. OK GNU C++14 TESTS 24 31 102400
77894789 Vintarel B April 24, 2020, 8:46 a.m. OK GNU C++14 TESTS 32 31 512000
77811158 Xtale_cross B April 23, 2020, 3:39 p.m. OK GNU C++14 TESTS 24 31 512000
77803281 yan-zp B April 23, 2020, 3:26 p.m. OK GNU C++14 TESTS 24 31 512000
77829126 mjtai B April 23, 2020, 4:16 p.m. OK GNU C++17 TESTS 24 15 409600
77837548 siddhant1303 B April 23, 2020, 4:36 p.m. OK GNU C++17 TESTS 24 30 102400
77834002 yinpeiqi B April 23, 2020, 4:28 p.m. OK GNU C++17 TESTS 24 30 204800
77804452 re_eVVorld B April 23, 2020, 3:27 p.m. OK GNU C++17 TESTS 24 30 204800
77933360 vaaven B April 24, 2020, 4 p.m. OK GNU C++17 TESTS 33 30 614400
77793180 TheWayISteppedOutTheCar B April 23, 2020, 3:11 p.m. OK GNU C++17 TESTS 24 30 716800
77786411 LayCurse B April 23, 2020, 3:03 p.m. OK GNU C++17 TESTS 24 30 2662400
77826307 scnucjh B April 23, 2020, 4:10 p.m. OK GNU C++17 TESTS 24 31 102400
77785935 UnstoppableChillMachine B April 23, 2020, 3:03 p.m. OK GNU C++17 TESTS 24 31 102400
77831048 dulatcodes B April 23, 2020, 4:21 p.m. OK GNU C++17 TESTS 24 31 102400
77863737 WZYYN B April 24, 2020, 12:47 a.m. OK GNU C++17 (64) TESTS 31 15 614400
77831641 Marcin_smu B April 23, 2020, 4:22 p.m. OK GNU C++17 (64) TESTS 24 15 921600
77821618 skip2004 B April 23, 2020, 4 p.m. OK GNU C++17 (64) TESTS 24 15 2560000
77790818 mateusz B April 23, 2020, 3:08 p.m. OK GNU C++17 (64) TESTS 24 31 102400
77928229 okwedook B April 24, 2020, 3:16 p.m. OK GNU C++17 (64) TESTS 33 31 512000
77790796 cookiedoth B April 23, 2020, 3:08 p.m. OK GNU C++17 (64) TESTS 24 31 512000
77793500 Nyaan B April 23, 2020, 3:12 p.m. OK GNU C++17 (64) TESTS 24 31 614400
77783960 Benq B April 23, 2020, 3:01 p.m. OK GNU C++17 (64) TESTS 24 31 614400
77959244 Nson B April 24, 2020, 9:37 p.m. OK GNU C++17 (64) TESTS 36 31 716800
77812337 SSRS_ B April 23, 2020, 3:41 p.m. OK GNU C++17 (64) TESTS 24 31 819200
77790890 SergeyMelnikov B April 23, 2020, 3:08 p.m. OK Java 11 TESTS 24 249 0
77806787 Dukkha B April 23, 2020, 3:31 p.m. OK Java 11 TESTS 24 265 0
77790633 Lewin B April 23, 2020, 3:08 p.m. OK Java 11 TESTS 24 265 0
77789359 uwi B April 23, 2020, 3:07 p.m. OK Java 11 TESTS 24 296 18534400
77796923 TheSawan B April 23, 2020, 3:16 p.m. OK Java 11 TESTS 24 872 18022400
77908661 Tatsuyaaaa B April 24, 2020, 11:57 a.m. OK Java 11 TESTS 33 967 0
77857613 Tatsuyaaaa B April 23, 2020, 10:06 p.m. OK Java 11 TESTS 29 967 0
77810022 sgt B April 23, 2020, 3:37 p.m. OK Java 8 TESTS 24 139 0
77810462 cwise B April 23, 2020, 3:38 p.m. OK Java 8 TESTS 24 171 46284800
77802305 Xylenox B April 23, 2020, 3:24 p.m. OK Java 8 TESTS 24 186 0
77838816 DarLam B April 23, 2020, 4:39 p.m. OK Java 8 TESTS 24 187 16691200
77800972 Taran_1407 B April 23, 2020, 3:22 p.m. OK Java 8 TESTS 24 202 0
77794474 SecondThread B April 23, 2020, 3:13 p.m. OK Java 8 TESTS 24 233 16588800
77804367 DanielW48 B April 23, 2020, 3:27 p.m. OK Java 8 TESTS 24 233 18124800
77787435 fetetriste B April 23, 2020, 3:04 p.m. OK Java 8 TESTS 24 249 0
77794086 Harpae B April 23, 2020, 3:12 p.m. OK Java 8 TESTS 24 280 16486400
77796882 aman28rwt B April 23, 2020, 3:16 p.m. OK Java 8 TESTS 24 296 4710400
77927404 bohuss B April 24, 2020, 3:09 p.m. OK Kotlin TESTS 33 280 18022400
77782778 darnley B April 23, 2020, 3 p.m. OK Kotlin TESTS 24 327 921600
77791798 Tlatoani B April 23, 2020, 3:10 p.m. OK Kotlin TESTS 24 670 17612800
77806958 alexey.enkov B April 23, 2020, 3:32 p.m. OK Kotlin TESTS 24 998 70246400
77823236 mban259 B April 23, 2020, 4:03 p.m. OK Mono C# TESTS 24 108 4198400
77823103 keymoon B April 23, 2020, 4:03 p.m. OK Mono C# TESTS 24 186 23552000
77865261 camypaper B April 24, 2020, 1:35 a.m. OK Mono C# TESTS 31 312 122572800
77879601 Chitanda_ B April 24, 2020, 5:46 a.m. OK MS C++ TESTS 32 31 4198400
77810221 r57shell B April 23, 2020, 3:37 p.m. OK MS C++ TESTS 24 62 16793600
77799861 lxhgww B April 23, 2020, 3:20 p.m. OK MS C++ TESTS 24 77 32256000
77879305 Cifko B April 24, 2020, 5:41 a.m. OK MS C++ 2017 TESTS 32 31 409600
77805046 kupriyanov B April 23, 2020, 3:28 p.m. OK MS C++ 2017 TESTS 24 46 409600
77821027 tarattata1 B April 23, 2020, 3:58 p.m. OK MS C++ 2017 TESTS 24 46 16179200
77898220 key.gal B April 24, 2020, 9:27 a.m. OK MS C++ 2017 TESTS 32 46 17408000
77808321 pichulia B April 23, 2020, 3:34 p.m. OK MS C++ 2017 TESTS 24 61 48537600
77817963 P___ B April 23, 2020, 3:52 p.m. OK MS C++ 2017 TESTS 24 78 4812800
77791696 danilgrig B April 23, 2020, 3:09 p.m. OK MS C++ 2017 TESTS 24 858 614400
77805211 nwi B April 23, 2020, 3:29 p.m. OK PyPy 2 TESTS 24 592 61337600
77794619 pajenegod B April 23, 2020, 3:13 p.m. OK PyPy 2 TESTS 24 717 35430400
77830910 pa.n.ik B April 23, 2020, 4:20 p.m. OK PyPy 2 TESTS 24 748 19968000
77964870 pa.n.ik B April 25, 2020, 12:11 a.m. OK PyPy 2 TESTS 37 763 19968000
77964857 pa.n.ik B April 25, 2020, 12:10 a.m. OK PyPy 2 TESTS 37 779 19968000
77964781 pa.n.ik B April 25, 2020, 12:08 a.m. OK PyPy 2 TESTS 37 795 20275200
77830791 lucifer1005 B April 23, 2020, 4:20 p.m. OK PyPy 3 TESTS 24 202 3788800
77812964 Kiri8128 B April 23, 2020, 3:42 p.m. OK PyPy 3 TESTS 24 218 5427200
77856538 conqueror_of_tourist B April 23, 2020, 9:50 p.m. OK PyPy 3 TESTS 26 374 21196800
77858161 Q.E.D B April 23, 2020, 10:16 p.m. OK PyPy 3 TESTS 31 452 23244800
77989670 zqx1392 B April 25, 2020, 7:40 a.m. OK PyPy 3 TESTS 37 483 19968000
77992488 codershuvo B April 25, 2020, 8:12 a.m. OK PyPy 3 TESTS 37 607 62566400
77889306 510030805voidf B April 24, 2020, 7:40 a.m. OK PyPy 3 TESTS 32 655 96256000
77991574 sotanishy B April 25, 2020, 8:02 a.m. OK PyPy 3 TESTS 37 888 20172800
77804156 sansen B April 23, 2020, 3:27 p.m. OK Rust TESTS 24 78 4505600
77814573 EbTech B April 23, 2020, 3:45 p.m. OK Rust TESTS 24 139 34099200

remove filters

Back to search problems