Codeforces Round 630 (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
1332 Codeforces Round 630 (Div. 2) FINISHED False 9000 146161499 March 31, 2020, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8199 ) D Walk on Matrix PROGRAMMING bitmasks constructive algorithms math 1700

B'Bob is playing a game named "Walk on Matrix". In this game, player is given an n x m matrix A=(a_{i,j}) , i.e. the element in the i -th row in the j -th column is a_{i,j} . Initially, player is located at position (1,1) with score a_{1,1} . To reach the goal, position (n,m) , player can move right or down, i.e. move from (x,y) to (x,y+1) or (x+1,y) , as long as player is still on the matrix. However, each move changes player 's score to the bitwise AND of the current score and the value at the position he moves to. Bob can 't wait to find out the maximum score he can get using the tool he recently learnt -- dynamic programming. Here is his algorithm for this problem. However, he suddenly realize that the algorithm above fails to output the maximum score for some matrix A . Thus, for any given non-negative integer k , he wants to find out an n x m matrix A=(a_{i,j}) such that It can be shown that for any given integer k such that 0 <= k <= 10^5 , there exists a matrix satisfying the above constraints. Please help him with it! The only line of the input contains one single integer k ( 0 <= k <= 10^5 ). Output two integers n , m ( 1 <= n,m <= 500 ) in the first line, representing the size of the matrix. Then output n lines with m integers in each line, a_{i,j} in the (i+1) -th row, j -th column. In the first example, the maximum score Bob can achieve is 300000 , while the output of his algorithm is 300000 . In the second example, the maximum score Bob can achieve is 7 &3 &3 &3 &7 &3=3 , while the output of his algorithm is 2 . '...

Tutorials

Codeforces Round #630 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
75233453 LTb D April 2, 2020, 11:46 a.m. OK Clang++17 Diagnostics TESTS 90 46 0 1700
74979775 fluffyowl D March 31, 2020, 3:21 p.m. OK D TESTS 90 31 0 1700
74991224 LaSWeeG D March 31, 2020, 3:54 p.m. OK FPC TESTS 90 46 0 1700
75552890 rky673 D April 5, 2020, 9:28 a.m. OK GNU C11 TESTS 90 31 0 1700
74994870 enrolled2003 D March 31, 2020, 4:03 p.m. OK GNU C11 TESTS 90 31 0 1700
74979912 QuisVenator D March 31, 2020, 3:21 p.m. OK GNU C11 TESTS 90 31 0 1700
75670197 vjudge4 D April 6, 2020, 3:20 p.m. OK GNU C11 TESTS 90 31 0 1700
76286431 lifers D April 12, 2020, 5:01 a.m. OK GNU C11 TESTS 90 31 0 1700
75670155 conodio D April 6, 2020, 3:19 p.m. OK GNU C11 TESTS 90 31 0 1700
74995240 755352046 D March 31, 2020, 4:04 p.m. OK GNU C11 TESTS 90 31 0 1700
75152295 ritheshvarma D April 1, 2020, 4:10 p.m. OK GNU C11 TESTS 90 31 204800 1700
75030127 Altair_Vega D April 1, 2020, 1:14 a.m. OK GNU C11 TESTS 90 31 204800 1700
75629134 jaehaaheaj D April 6, 2020, 6:22 a.m. OK GNU C11 TESTS 90 31 307200 1700
74986617 xish D March 31, 2020, 3:40 p.m. OK GNU C++11 TESTS 90 30 0 1700
74990510 wind_cross D March 31, 2020, 3:52 p.m. OK GNU C++11 TESTS 90 30 819200 1700
76293315 buhongbugaiming D April 12, 2020, 6:25 a.m. OK GNU C++11 TESTS 90 31 0 1700
76442397 Acc_plus D April 13, 2020, 2:27 a.m. OK GNU C++11 TESTS 90 31 0 1700
76309219 HOJQVFNA D April 12, 2020, 9:13 a.m. OK GNU C++11 TESTS 90 31 0 1700
76301713 scrappycoder D April 12, 2020, 7:52 a.m. OK GNU C++11 TESTS 90 31 0 1700
76300976 sktcodeforces D April 12, 2020, 7:44 a.m. OK GNU C++11 TESTS 90 31 0 1700
76294337 martinmxq D April 12, 2020, 6:35 a.m. OK GNU C++11 TESTS 90 31 0 1700
76285584 luogu_bot1 D April 12, 2020, 4:46 a.m. OK GNU C++11 TESTS 90 31 0 1700
76069825 Loi_October1 D April 10, 2020, 8:31 a.m. OK GNU C++11 TESTS 90 31 0 1700
74989852 batsumaru D March 31, 2020, 3:50 p.m. OK GNU C++14 TESTS 90 30 0 1700
74992150 vineetjai D March 31, 2020, 3:57 p.m. OK GNU C++14 TESTS 90 30 0 1700
76277259 vjudge5 D April 12, 2020, 1:43 a.m. OK GNU C++14 TESTS 90 31 0 1700
76279829 harady D April 12, 2020, 2:51 a.m. OK GNU C++14 TESTS 90 31 0 1700
76290917 kzvd4729 D April 12, 2020, 5:58 a.m. OK GNU C++14 TESTS 90 31 0 1700
76302898 vikas_404 D April 12, 2020, 8:04 a.m. OK GNU C++14 TESTS 90 31 0 1700
76303301 kc_17 D April 12, 2020, 8:09 a.m. OK GNU C++14 TESTS 90 31 0 1700
76308109 sarthakoherwal D April 12, 2020, 9:01 a.m. OK GNU C++14 TESTS 90 31 0 1700
76328039 emanlaicepsa D April 12, 2020, 1:07 p.m. OK GNU C++14 TESTS 90 31 0 1700
76446946 white_knight24 D April 13, 2020, 4:05 a.m. OK GNU C++14 TESTS 90 31 0 1700
76036306 farbod_rad D April 9, 2020, 8:24 p.m. OK GNU C++17 TESTS 90 30 0 1700
75433326 shivam24a D April 3, 2020, 8:04 p.m. OK GNU C++17 TESTS 90 30 0 1700
75140432 cynical_ D April 1, 2020, 3:38 p.m. OK GNU C++17 TESTS 90 30 0 1700
75023542 y0u_kn0w_wh0 D March 31, 2020, 9:58 p.m. OK GNU C++17 TESTS 90 30 0 1700
74983570 Georgioss D March 31, 2020, 3:31 p.m. OK GNU C++17 TESTS 90 30 0 1700
75040394 Shashank_R D April 1, 2020, 5:10 a.m. OK GNU C++17 TESTS 90 30 2048000 1700
76442996 Ricky_pon D April 13, 2020, 2:41 a.m. OK GNU C++17 TESTS 90 31 0 1700
76441053 Clair_de_Lune D April 13, 2020, 1:51 a.m. OK GNU C++17 TESTS 90 31 0 1700
76436656 THINKFASTER D April 12, 2020, 11:44 p.m. OK GNU C++17 TESTS 90 31 0 1700
76430111 raja123458 D April 12, 2020, 9:01 p.m. OK GNU C++17 TESTS 90 31 0 1700
75043347 Scissors_Ss D April 1, 2020, 5:51 a.m. OK GNU C++17 (64) TESTS 90 30 0 1700
75000591 sashiming D March 31, 2020, 5:15 p.m. OK GNU C++17 (64) TESTS 90 30 0 1700
75340184 LITMUS D April 3, 2020, 11:56 a.m. OK GNU C++17 (64) TESTS 90 31 0 1700
75340309 _ROY_ D April 3, 2020, 11:58 a.m. OK GNU C++17 (64) TESTS 90 31 0 1700
75343363 ivan100sic D April 3, 2020, 12:36 p.m. OK GNU C++17 (64) TESTS 90 31 0 1700
75584512 inti.glez D April 5, 2020, 3:36 p.m. OK GNU C++17 (64) TESTS 90 31 0 1700
75618570 kort0n D April 6, 2020, 2:56 a.m. OK GNU C++17 (64) TESTS 90 31 0 1700
75654655 ir_1st_vil D April 6, 2020, 12:18 p.m. OK GNU C++17 (64) TESTS 90 31 0 1700
75797919 vjudge4 D April 8, 2020, 3:05 a.m. OK GNU C++17 (64) TESTS 90 31 0 1700
76431324 Akulyat D April 12, 2020, 9:25 p.m. OK GNU C++17 (64) TESTS 90 31 0 1700
75035131 synapse D April 1, 2020, 3:27 a.m. OK Go TESTS 90 31 102400 1700
75001769 baihuahua D March 31, 2020, 5:25 p.m. OK Go TESTS 90 46 102400 1700
75617499 Russell_Emerine D April 6, 2020, 2:22 a.m. OK Haskell TESTS 90 46 102400 1700
74991634 Leewings D March 31, 2020, 3:55 p.m. OK Java 11 TESTS 90 187 0 1700
76237662 foumani D April 11, 2020, 6:21 a.m. OK Java 11 TESTS 90 202 0 1700
76052033 sajith D April 10, 2020, 3:30 a.m. OK Java 11 TESTS 90 202 0 1700
75088899 happy15 D April 1, 2020, 2:08 p.m. OK Java 11 TESTS 90 202 0 1700
74993365 jenish9599 D March 31, 2020, 4 p.m. OK Java 11 TESTS 90 202 0 1700
74987783 14visheshjain D March 31, 2020, 3:44 p.m. OK Java 11 TESTS 90 202 0 1700
75728631 alankritanand001 D April 7, 2020, 9:22 a.m. OK Java 11 TESTS 90 218 0 1700
75061485 abhi123valani D April 1, 2020, 9:23 a.m. OK Java 11 TESTS 90 218 0 1700
74987366 pikapika00 D March 31, 2020, 3:43 p.m. OK Java 11 TESTS 90 218 0 1700
74998518 rreeennnnn D March 31, 2020, 5:01 p.m. OK Java 11 TESTS 90 218 204800 1700
75209001 In_The_Name_Of_Love D April 2, 2020, 6:47 a.m. OK Java 8 TESTS 90 109 0 1700
75289549 nandit D April 2, 2020, 8:47 p.m. OK Java 8 TESTS 90 109 0 1700
75265777 Sandip_Jana D April 2, 2020, 4:33 p.m. OK Java 8 TESTS 90 109 0 1700
75221925 alibaba D April 2, 2020, 9:35 a.m. OK Java 8 TESTS 90 109 0 1700
75176380 manish_98 D April 1, 2020, 7:35 p.m. OK Java 8 TESTS 90 109 0 1700
75056319 adarsh000321 D April 1, 2020, 8:24 a.m. OK Java 8 TESTS 90 109 0 1700
75020267 prashantpiyush D March 31, 2020, 8:50 p.m. OK Java 8 TESTS 90 109 0 1700
75012327 prem_cse D March 31, 2020, 6:53 p.m. OK Java 8 TESTS 90 109 0 1700
75000031 linarkou D March 31, 2020, 5:11 p.m. OK Java 8 TESTS 90 109 0 1700
75688560 spar5h D April 6, 2020, 7 p.m. OK Java 8 TESTS 90 124 0 1700
75090353 bohuss D April 1, 2020, 2:22 p.m. OK Kotlin TESTS 90 124 0 1700
74979887 jonas.havelka.42 D March 31, 2020, 3:21 p.m. OK Kotlin TESTS 90 139 0 1700
74978983 schmak.ekb D March 31, 2020, 3:18 p.m. OK Kotlin TESTS 90 140 0 1700
74992672 MaxPylypovych D March 31, 2020, 3:58 p.m. OK Kotlin TESTS 90 155 102400 1700
75064014 Spheniscine D April 1, 2020, 9:50 a.m. OK Kotlin TESTS 90 155 1638400 1700
75064146 Spheniscine D April 1, 2020, 9:52 a.m. OK Kotlin TESTS 90 156 1638400 1700
75228543 koosmarci D April 2, 2020, 10:52 a.m. OK Mono C# TESTS 90 46 0 1700
75003214 bati06 D March 31, 2020, 5:37 p.m. OK Mono C# TESTS 90 62 0 1700
74989862 Anastasiya_Andreevna D March 31, 2020, 3:50 p.m. OK Mono C# TESTS 90 62 0 1700
74985750 songhaoran D March 31, 2020, 3:37 p.m. OK MS C++ TESTS 90 31 0 1700
75013751 Bullbas D March 31, 2020, 7:11 p.m. OK MS C++ TESTS 90 31 0 1700
74988809 laboba D March 31, 2020, 3:47 p.m. OK MS C++ TESTS 90 31 0 1700
75826534 vjudge5 D April 8, 2020, 11:04 a.m. OK MS C++ TESTS 90 31 0 1700
74988805 kevin19984 D March 31, 2020, 3:47 p.m. OK MS C++ TESTS 90 31 1024000 1700
74979396 not_antony D March 31, 2020, 3:20 p.m. OK MS C++ TESTS 90 46 0 1700
75811777 vjudge1 D April 8, 2020, 7:31 a.m. OK MS C++ TESTS 90 46 0 1700
75541851 jhpark_inha D April 5, 2020, 7:07 a.m. OK MS C++ 2017 TESTS 90 31 0 1700
76438817 vjudge1 D April 13, 2020, 12:49 a.m. OK MS C++ 2017 TESTS 90 31 0 1700
76436036 Sariabell D April 12, 2020, 11:24 p.m. OK MS C++ 2017 TESTS 90 31 0 1700
75537359 vjudge3 D April 5, 2020, 5:57 a.m. OK MS C++ 2017 TESTS 90 31 0 1700
75346318 omerb.zeybek D April 3, 2020, 1:13 p.m. OK MS C++ 2017 TESTS 90 31 0 1700
75325849 hwqconceptnick D April 3, 2020, 9:06 a.m. OK MS C++ 2017 TESTS 90 31 0 1700
75325831 taolahung01 D April 3, 2020, 9:06 a.m. OK MS C++ 2017 TESTS 90 31 0 1700
75213085 lionerd D April 2, 2020, 7:39 a.m. OK MS C++ 2017 TESTS 90 31 0 1700
75166065 q8514199 D April 1, 2020, 5:35 p.m. OK MS C++ 2017 TESTS 90 31 0 1700
75048639 lijiayi123 D April 1, 2020, 6:54 a.m. OK MS C++ 2017 TESTS 90 31 0 1700
75208135 vjudge1 D April 2, 2020, 6:35 a.m. OK Node.js TESTS 90 186 307200 1700
75208136 vjudge3 D April 2, 2020, 6:35 a.m. OK Node.js TESTS 90 202 614400 1700
75253975 theONEPIECE D April 2, 2020, 2:51 p.m. OK Perl TESTS 90 46 0 1700
75612294 wolffd D April 5, 2020, 11:03 p.m. OK PyPy 2 TESTS 90 124 0 1700
75023337 nikolapesic2802 D March 31, 2020, 9:54 p.m. OK PyPy 2 TESTS 90 124 0 1700
75048047 snape_here D April 1, 2020, 6:48 a.m. OK PyPy 2 TESTS 90 139 102400 1700
74985960 Mukundan314 D March 31, 2020, 3:38 p.m. OK PyPy 2 TESTS 90 140 0 1700
75025047 raj1307 D March 31, 2020, 10:38 p.m. OK PyPy 2 TESTS 90 140 307200 1700
75005223 11fingers D March 31, 2020, 5:56 p.m. OK PyPy 2 TESTS 90 140 1228800 1700
75283936 shehebe D April 2, 2020, 7:25 p.m. OK PyPy 2 TESTS 90 155 1228800 1700
75016906 chaudhary_19 D March 31, 2020, 7:57 p.m. OK PyPy 2 TESTS 90 171 0 1700
75042350 Gaurav1 D April 1, 2020, 5:38 a.m. OK PyPy 2 TESTS 90 187 614400 1700
74986032 your_Daddy___ D March 31, 2020, 3:38 p.m. OK PyPy 2 TESTS 90 249 9216000 1700
76225974 Lazy_lad D April 11, 2020, 2:29 a.m. OK PyPy 3 TESTS 90 140 0 1700
75816405 tycyd D April 8, 2020, 8:35 a.m. OK PyPy 3 TESTS 90 140 0 1700
75808139 UD_xlinsist D April 8, 2020, 6:41 a.m. OK PyPy 3 TESTS 90 140 0 1700
75777308 brthyyjp D April 7, 2020, 6:43 p.m. OK PyPy 3 TESTS 90 140 0 1700
75470200 _cielll_ D April 4, 2020, 9:06 a.m. OK PyPy 3 TESTS 90 140 0 1700
75350537 nipungupta37 D April 3, 2020, 2:02 p.m. OK PyPy 3 TESTS 90 140 0 1700
75327882 Isele D April 3, 2020, 9:32 a.m. OK PyPy 3 TESTS 90 140 0 1700
75316395 fakecoder7 D April 3, 2020, 6:53 a.m. OK PyPy 3 TESTS 90 140 0 1700
75306276 ss7890 D April 3, 2020, 3:39 a.m. OK PyPy 3 TESTS 90 140 0 1700
75302530 superman_98 D April 3, 2020, 3:03 a.m. OK PyPy 3 TESTS 90 140 0 1700
75063825 ComptineDunAutreEte D April 1, 2020, 9:48 a.m. OK Python 2 TESTS 90 202 0 1700
75318767 binhtranit D April 3, 2020, 7:27 a.m. OK Python 3 TESTS 90 108 0 1700
76280017 caoduy73 D April 12, 2020, 2:54 a.m. OK Python 3 TESTS 90 109 0 1700
76202912 Gamapro D April 10, 2020, 6:26 p.m. OK Python 3 TESTS 90 109 0 1700
76079503 ACetate D April 10, 2020, 10:39 a.m. OK Python 3 TESTS 90 109 0 1700
76028235 LintuStorm D April 9, 2020, 6:37 p.m. OK Python 3 TESTS 90 109 0 1700
75551280 a9qnrp D April 5, 2020, 9:06 a.m. OK Python 3 TESTS 90 109 0 1700
75285607 JustasLe D April 2, 2020, 7:45 p.m. OK Python 3 TESTS 90 109 0 1700
75063913 bada_billa D April 1, 2020, 9:49 a.m. OK Python 3 TESTS 90 109 0 1700
75056311 s.mukherjee.s D April 1, 2020, 8:24 a.m. OK Python 3 TESTS 90 109 0 1700
75055809 raptor_century D April 1, 2020, 8:18 a.m. OK Python 3 TESTS 90 109 0 1700
76033884 avtobus D April 9, 2020, 7:47 p.m. OK Ruby TESTS 90 93 102400 1700
74993951 rustafarian D March 31, 2020, 4:01 p.m. OK Rust TESTS 90 46 0 1700
75002249 kobae964 D March 31, 2020, 5:28 p.m. OK Rust TESTS 90 46 307200 1700

remove filters

Back to search problems