Educational Codeforces Round 38 (Rated for 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
938 Educational Codeforces Round 38 (Rated for Div. 2) FINISHED False 7200 218732124 Feb. 16, 2018, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3372 ) C Constructing Tests PROGRAMMING binary search brute force constructive algorithms 1700

B"Let's denote a m-free matrix as a binary (that is, consisting of only 1's and 0's) matrix such that every square submatrix of size m xe2 x80 x89 xc3 x97 xe2 x80 x89m of this matrix contains at least one zero. Consider the following problem: You are given two integers n and m. You have to construct an m-free square matrix of size n xe2 x80 x89 xc3 x97 xe2 x80 x89n such that the number of 1's in this matrix is maximum possible. Print the maximum possible number of 1's in such matrix. You don't have to solve this problem. Instead, you have to construct a few tests for it. You will be given t numbers x1, x2, ..., xt. For every , find two integers ni and mi (ni xe2 x80 x89 xe2 x89 xa5 xe2 x80 x89mi) such that the answer for the aforementioned problem is exactly xi if we set n xe2 x80 x89= xe2 x80 x89ni and m xe2 x80 x89= xe2 x80 x89mi. The first line contains one integer t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of tests you have to construct. Then t lines follow, i-th line containing one integer xi (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Note that in hacks you have to set t xe2 x80 x89= xe2 x80 x891. For each test you have to construct, output two positive numbers ni and mi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89mi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ni xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) such that the maximum number of 1's in a mi-free ni xe2 x80 x89 xc3 x97 xe2 x80 x89ni matrix is exactly xi. If there are multiple solutions, you may output any of them; and if this is impossible to construct a test, output a single integer xe2 x80 x89- xe2 x80 x891. "...

Tutorials

Educational Codeforces Round 38 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36693298 antoshkin C March 28, 2018, 1:02 p.m. OK Delphi TESTS 24 31 3993600 1700
35423977 ruban C Feb. 17, 2018, 4:14 p.m. OK Delphi TESTS 24 31 18534400 1700
35362806 1353055672 C Feb. 16, 2018, 4:33 p.m. OK FPC TESTS 24 15 1638400 1700
35366968 KryXtal C Feb. 16, 2018, 4:55 p.m. OK FPC TESTS 24 15 2048000 1700
35469238 yourbeach C Feb. 19, 2018, 11:47 a.m. OK FPC TESTS 24 30 1638400 1700
35373265 bsgnl952 C Feb. 16, 2018, 6:38 p.m. OK FPC TESTS 24 30 1638400 1700
35366472 slavik228 C Feb. 16, 2018, 4:53 p.m. OK FPC TESTS 24 30 1638400 1700
35363054 PazaMaza C Feb. 16, 2018, 4:34 p.m. OK FPC TESTS 24 31 1638400 1700
35362692 VTifand C Feb. 16, 2018, 4:32 p.m. OK FPC TESTS 24 264 1638400 1700
35379788 lalala233 C Feb. 17, 2018, 1:10 a.m. OK FPC TESTS 24 421 1638400 1700
35517336 JOTOJ C Feb. 20, 2018, 9:49 a.m. OK GNU C TESTS 24 15 1843200 1700
35364193 psb0623 C Feb. 16, 2018, 4:40 p.m. OK GNU C TESTS 24 15 1843200 1700
35356030 CtrlCV C Feb. 16, 2018, 3:56 p.m. OK GNU C TESTS 24 15 1843200 1700
35465162 Fuko_Ibuki C Feb. 19, 2018, 8:19 a.m. OK GNU C TESTS 24 15 2048000 1700
38779914 MYNAMEISSHARIFUL C May 30, 2018, 4:38 p.m. OK GNU C TESTS 24 31 3379200 1700
35357056 physics0523 C Feb. 16, 2018, 4:01 p.m. OK GNU C TESTS 24 31 3993600 1700
36439610 aniket.shrimal C March 20, 2018, 5:52 p.m. OK GNU C TESTS 24 108 3276800 1700
35362818 coderbd C Feb. 16, 2018, 4:33 p.m. OK GNU C TESTS 24 265 1843200 1700
35363031 coderbd C Feb. 16, 2018, 4:34 p.m. OK GNU C TESTS 24 296 1843200 1700
35370924 codemart786 C Feb. 16, 2018, 5:30 p.m. OK GNU C TESTS 24 390 1843200 1700
39587199 vjudge1 C June 24, 2018, 2:46 a.m. OK GNU C++ TESTS 24 15 0 1700
36299428 vjudge3 C March 15, 2018, 12:31 p.m. OK GNU C++ TESTS 24 15 1843200 1700
36061797 vjudge1 C March 8, 2018, 5:51 a.m. OK GNU C++ TESTS 24 15 1843200 1700
36061429 vjudge3 C March 8, 2018, 5:29 a.m. OK GNU C++ TESTS 24 15 1843200 1700
36061400 vjudge5 C March 8, 2018, 5:27 a.m. OK GNU C++ TESTS 24 15 1843200 1700
36033823 vjudge4 C March 7, 2018, 5:57 a.m. OK GNU C++ TESTS 24 15 1843200 1700
36033633 vjudge5 C March 7, 2018, 5:46 a.m. OK GNU C++ TESTS 24 15 1843200 1700
36033620 vjudge1 C March 7, 2018, 5:45 a.m. OK GNU C++ TESTS 24 15 1843200 1700
36033600 vjudge1 C March 7, 2018, 5:44 a.m. OK GNU C++ TESTS 24 15 1843200 1700
36033510 vjudge1 C March 7, 2018, 5:38 a.m. OK GNU C++ TESTS 24 15 1843200 1700
52537341 rainboy C April 9, 2019, 4:16 p.m. OK GNU C11 TESTS 24 31 0 1700
54466871 luogu_bot2 C May 22, 2019, 1:06 a.m. OK GNU C11 TESTS 24 31 0 1700
35465187 vjudge3 C Feb. 19, 2018, 8:20 a.m. OK GNU C11 TESTS 24 46 2048000 1700
39204078 aniervs C June 13, 2018, 1:45 a.m. OK GNU C++11 TESTS 24 15 0 1700
49183509 _ShadowSong C Jan. 30, 2019, 4:03 a.m. OK GNU C++11 TESTS 24 15 0 1700
35388532 GXF000 C Feb. 17, 2018, 10:02 a.m. OK GNU C++11 TESTS 24 15 1843200 1700
35380764 binsjl C Feb. 17, 2018, 3:04 a.m. OK GNU C++11 TESTS 24 15 1843200 1700
35358782 zsyzsy C Feb. 16, 2018, 4:11 p.m. OK GNU C++11 TESTS 24 15 1843200 1700
35358632 octagon C Feb. 16, 2018, 4:10 p.m. OK GNU C++11 TESTS 24 15 1843200 1700
35358427 Photinia.S C Feb. 16, 2018, 4:09 p.m. OK GNU C++11 TESTS 24 15 1843200 1700
35418847 dsz6223042 C Feb. 17, 2018, 2:06 p.m. OK GNU C++11 TESTS 24 15 1843200 1700
35524897 yaoling1997 C Feb. 20, 2018, 2:52 p.m. OK GNU C++11 TESTS 24 15 1843200 1700
36299404 sun_hongjia C March 15, 2018, 12:31 p.m. OK GNU C++11 TESTS 24 15 1843200 1700
46535833 kurarrr C Dec. 3, 2018, 8:56 a.m. OK GNU C++14 TESTS 24 15 0 1700
38591786 humveea6 C May 24, 2018, 4:12 p.m. OK GNU C++14 TESTS 24 15 0 1700
58545700 _FlyingColor_ C Aug. 10, 2019, 4:30 p.m. OK GNU C++14 TESTS 24 15 0 1700
55573683 lucasturci C June 14, 2019, 8:55 p.m. OK GNU C++14 TESTS 24 15 0 1700
46774073 princenarula222 C Dec. 8, 2018, 6:53 p.m. OK GNU C++14 TESTS 24 15 0 1700
35951570 krijgertje C March 4, 2018, 9:44 p.m. OK GNU C++14 TESTS 24 15 1843200 1700
35916175 vjudge2 C March 4, 2018, 10:13 a.m. OK GNU C++14 TESTS 24 15 1843200 1700
35980248 boatmuscles C March 6, 2018, 3:07 a.m. OK GNU C++14 TESTS 24 15 1843200 1700
35979152 3_14149 C March 6, 2018, 12:51 a.m. OK GNU C++14 TESTS 24 15 1843200 1700
35970587 __Darkmoon C March 5, 2018, 3:37 p.m. OK GNU C++14 TESTS 24 15 1843200 1700
53436184 anjn98 C April 27, 2019, 7:21 p.m. OK GNU C++17 TESTS 24 15 0 1700
68625252 yuhta C Jan. 11, 2020, 9:17 p.m. OK GNU C++17 TESTS 24 15 0 1700
57189372 spellstaker C July 17, 2019, 9:54 a.m. OK GNU C++17 TESTS 24 15 0 1700
57148235 SamuelLim C July 16, 2019, 1:45 p.m. OK GNU C++17 TESTS 24 15 0 1700
50307815 sunkafei C Feb. 22, 2019, 7:23 a.m. OK GNU C++17 TESTS 24 15 409600 1700
42796174 ariawater C Sept. 12, 2018, 11:49 a.m. OK GNU C++17 TESTS 24 15 512000 1700
35674125 atomzeno C Feb. 25, 2018, 9:30 a.m. OK GNU C++17 TESTS 24 15 1843200 1700
35613397 MikhailovBair C Feb. 24, 2018, 2:20 a.m. OK GNU C++17 TESTS 24 15 1843200 1700
35523657 Qumeric C Feb. 20, 2018, 2:11 p.m. OK GNU C++17 TESTS 24 15 1843200 1700
36118049 von6yka C March 9, 2018, 1:25 p.m. OK GNU C++17 TESTS 24 15 1843200 1700
36224355 kalao C March 12, 2018, 12:53 p.m. OK GNU C++17 Diagnostics TESTS 24 967 100761600 1700
35592099 stczhc C Feb. 23, 2018, 9:06 a.m. OK Haskell TESTS 24 592 53248000 1700
49886111 wadissimo C Feb. 13, 2019, 9:28 p.m. OK Java 8 TESTS 24 109 0 1700
52585369 Atomwolfie C April 10, 2019, 11:07 p.m. OK Java 8 TESTS 24 109 0 1700
35418481 mathmaniac C Feb. 17, 2018, 2 p.m. OK Java 8 TESTS 24 109 20992000 1700
68059121 ijxjdjd C Jan. 2, 2020, 1:28 a.m. OK Java 8 TESTS 24 124 0 1700
66394530 bluesky111 C Dec. 6, 2019, 10:18 a.m. OK Java 8 TESTS 24 124 0 1700
66292507 unicorn20141 C Dec. 5, 2019, 12:32 a.m. OK Java 8 TESTS 24 124 0 1700
52539886 Dukkha C April 9, 2019, 5:30 p.m. OK Java 8 TESTS 24 124 0 1700
48116779 kusomushi C Jan. 9, 2019, 1:17 p.m. OK Java 8 TESTS 24 124 0 1700
35375395 tyuan73 C Feb. 16, 2018, 8:02 p.m. OK Java 8 TESTS 24 124 20582400 1700
35446714 tushar_987 C Feb. 18, 2018, 1:18 p.m. OK Java 8 TESTS 24 124 20684800 1700
54654198 DeadPillow C May 26, 2019, 7:20 a.m. OK Kotlin TESTS 24 109 0 1700
38172032 og.kostya C May 13, 2018, 9:59 a.m. OK Mono C# TESTS 24 46 7987200 1700
35354153 kuuso C Feb. 16, 2018, 3:46 p.m. OK Mono C# TESTS 24 62 9216000 1700
35355210 chdn C Feb. 16, 2018, 3:52 p.m. OK MS C++ TESTS 24 15 2048000 1700
35600911 ArashY C Feb. 23, 2018, 3:20 p.m. OK MS C++ TESTS 24 15 2048000 1700
35428968 mayflower C Feb. 17, 2018, 7:07 p.m. OK MS C++ TESTS 24 15 2048000 1700
38258650 ys1468362286 C May 15, 2018, 6:41 a.m. OK MS C++ TESTS 24 15 3481600 1700
38258675 vjudge5 C May 15, 2018, 6:42 a.m. OK MS C++ TESTS 24 30 3481600 1700
35368613 Ne0n C Feb. 16, 2018, 5:02 p.m. OK MS C++ TESTS 24 31 2048000 1700
35363386 Bfk C Feb. 16, 2018, 4:36 p.m. OK MS C++ TESTS 24 31 2048000 1700
35647758 vjudge4 C Feb. 24, 2018, 2:08 p.m. OK MS C++ TESTS 24 31 2150400 1700
36463117 FallingFeather C March 21, 2018, 7:24 p.m. OK MS C++ TESTS 24 31 3481600 1700
38897572 scorpiowf C June 2, 2018, 4:10 p.m. OK MS C++ TESTS 24 31 3481600 1700
35368491 aeternalis1 C Feb. 16, 2018, 5:02 p.m. OK PyPy 2 TESTS 24 93 21504000 1700
35549024 Yash_ C Feb. 21, 2018, 1:38 p.m. OK PyPy 2 TESTS 24 108 21504000 1700
35438439 iit2014101 C Feb. 18, 2018, 6:56 a.m. OK PyPy 2 TESTS 24 108 21606400 1700
36682997 frmsaul C March 28, 2018, 4:37 a.m. OK PyPy 2 TESTS 24 124 22937600 1700
35897970 _____i_____ C March 3, 2018, 6:11 p.m. OK PyPy 2 TESTS 24 139 21504000 1700
35359115 pajenegod C Feb. 16, 2018, 4:12 p.m. OK PyPy 2 TESTS 24 249 21504000 1700
35359807 pajenegod C Feb. 16, 2018, 4:16 p.m. OK PyPy 2 TESTS 24 265 21504000 1700
35363714 algmyr C Feb. 16, 2018, 4:38 p.m. OK PyPy 2 TESTS 24 451 21708800 1700
35427245 maxnk C Feb. 17, 2018, 5:59 p.m. OK PyPy 3 TESTS 24 77 20172800 1700
35382541 hackentosh11 C Feb. 17, 2018, 5:29 a.m. OK PyPy 3 TESTS 24 93 20889600 1700
35360717 astrom.lars C Feb. 16, 2018, 4:21 p.m. OK PyPy 3 TESTS 24 109 20172800 1700
35361452 kanak15140 C Feb. 16, 2018, 4:25 p.m. OK PyPy 3 TESTS 24 124 20070400 1700
35364378 this_is_Crypto_hash C Feb. 16, 2018, 4:41 p.m. OK PyPy 3 TESTS 24 139 20889600 1700
46750508 mug C Dec. 8, 2018, 8:58 a.m. OK PyPy 3 TESTS 24 140 0 1700
57072428 x313x C July 15, 2019, 3:17 a.m. OK PyPy 3 TESTS 24 155 1433600 1700
35434752 Teferi C Feb. 18, 2018, 2:21 a.m. OK PyPy 3 TESTS 24 499 20275200 1700
57340670 artifexbm C July 19, 2019, 6:20 p.m. OK PyPy 3 TESTS 24 514 4096000 1700
35368423 aeternalis1 C Feb. 16, 2018, 5:01 p.m. OK Python 2 TESTS 24 249 5120000 1700
39236133 Ali_Pi C June 14, 2018, 8:33 a.m. OK Python 2 TESTS 24 311 512000 1700
35362768 biltharesatyendra C Feb. 16, 2018, 4:32 p.m. OK Python 2 TESTS 24 701 4608000 1700
35357446 exoji2e C Feb. 16, 2018, 4:03 p.m. OK Python 2 TESTS 24 733 7065600 1700
36373359 manhphamnguyen C March 17, 2018, 10:35 p.m. OK Python 3 TESTS 24 124 7065600 1700
35377987 nkorobkov C Feb. 16, 2018, 10:13 p.m. OK Python 3 TESTS 24 171 5734400 1700
35377818 Kirillov_Alexey C Feb. 16, 2018, 10:03 p.m. OK Python 3 TESTS 24 358 5632000 1700
35520863 mtarunsai1999 C Feb. 20, 2018, 12:28 p.m. OK Python 3 TESTS 24 374 5632000 1700
35355162 AliceG C Feb. 16, 2018, 3:52 p.m. OK Python 3 TESTS 24 374 5632000 1700
35377863 Kirillov_Alexey C Feb. 16, 2018, 10:06 p.m. OK Python 3 TESTS 24 389 5632000 1700
35377826 Kirillov_Alexey C Feb. 16, 2018, 10:04 p.m. OK Python 3 TESTS 24 405 5632000 1700
35377794 Kirillov_Alexey C Feb. 16, 2018, 10:02 p.m. OK Python 3 TESTS 24 405 5632000 1700
36425608 Leonardo_von_Einzbern C March 20, 2018, 6:14 a.m. OK Python 3 TESTS 24 514 7065600 1700
42142399 Mk_Python_v1 C Aug. 27, 2018, 6:30 a.m. OK Python 3 TESTS 24 561 0 1700
35354798 suibaka C Feb. 16, 2018, 3:50 p.m. OK Rust TESTS 24 218 1433600 1700

remove filters

Back to search problems