Codeforces Global Round 20

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
1672 Codeforces Global Round 20 FINISHED False 10800 86543662 April 23, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2289 ) E notepad.exe PROGRAMMING binary search constructive algorithms greedy interactive 2200

B'This is an interactive problem. There are n words in a text editor. The i -th word has length l_i ( 1 <= q l_i <= q 2000 ). The array l is hidden and only known by the grader. The text editor displays words in lines, splitting each two words in a line with at least one space. Note that a line does not have to end with a space. Let the height of the text editor refer to the number of lines used. For the given width, the text editor will display words in such a way that the height is minimized. More formally, suppose that the text editor has width w . Let a be an array of length k+1 where 1=a_1 < a_2 < ldots < a_{k+1}=n+1 . a is a valid array if for all 1 <= q i <= q k , l_{a_i}+1+l_{a_i+1}+1+ ldots+1+l_{a_{i+1}-1} <= q w . Then the height of the text editor is the minimum k over all valid arrays. Note that if w < max(l_i) , the text editor cannot display all the words properly and will crash, and the height of the text editor will be 0 instead. You can ask n+30 queries. In one query, you provide a width w . Then, the grader will return the height h_w of the text editor when its width is w . Find the minimum area of the text editor, which is the minimum value of w cdot h_w over all w for which h_w neq 0 . The lengths are fixed in advance. In other words, the interactor is not adaptive. The first and only line of input contains a single integer n ( 1 <= q n <= q 2000 ) -- the number of words on the text editor. It is guaranteed that the hidden lengths l_i satisfy 1 <= q l_i <= q 2000 . Begin the interaction by reading n . To make a query, print "? w " (without quotes, 1 <= q w <= q 10^9 ). Then you should read our response from standard input, that is, h_w . If your program has made an invalid query or has run out of tries, the interactor will terminate immediately and your program will get a'...

Tutorials

Global Round 20 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
154784000 rainboy E April 23, 2022, 7:28 p.m. OK GNU C11 TESTS 29 30 0 2200
154815445 XueYJ E April 24, 2022, 6:24 a.m. OK GNU C++14 TESTS 29 15 0 2200
154814480 leaps E April 24, 2022, 6:12 a.m. OK GNU C++14 TESTS 29 15 0 2200
154808043 Yaimsea E April 24, 2022, 4:39 a.m. OK GNU C++14 TESTS 29 15 0 2200
154804658 _chess_ E April 24, 2022, 3:29 a.m. OK GNU C++14 TESTS 29 15 0 2200
154875475 HaPpY1213 E April 24, 2022, 4:52 p.m. OK GNU C++14 TESTS 29 15 0 2200
154775484 YksKuusiTAlv E April 23, 2022, 5:43 p.m. OK GNU C++14 TESTS 28 15 0 2200
154858379 April_lie E April 24, 2022, 1:47 p.m. OK GNU C++14 TESTS 29 15 0 2200
154867894 rikka_cpp E April 24, 2022, 3:29 p.m. OK GNU C++14 TESTS 29 15 0 2200
154814864 CunFu_ZhuGe E April 24, 2022, 6:17 a.m. OK GNU C++14 TESTS 29 15 204800 2200
154808168 applese E April 24, 2022, 4:42 a.m. OK GNU C++14 TESTS 29 15 204800 2200
154884867 Hash_coder27 E April 24, 2022, 7:21 p.m. OK GNU C++17 TESTS 29 15 0 2200
154878296 DogAndCat E April 24, 2022, 5:33 p.m. OK GNU C++17 TESTS 29 15 0 2200
154876050 Lunasama E April 24, 2022, 5 p.m. OK GNU C++17 TESTS 29 15 0 2200
154868001 munditva E April 24, 2022, 3:30 p.m. OK GNU C++17 TESTS 29 15 0 2200
154835625 ssamt E April 24, 2022, 10:08 a.m. OK GNU C++17 TESTS 29 15 0 2200
154832646 _LeMur_ E April 24, 2022, 9:33 a.m. OK GNU C++17 TESTS 29 15 0 2200
154826835 EternalTempest E April 24, 2022, 8:31 a.m. OK GNU C++17 TESTS 29 15 0 2200
154800820 WinterLove E April 24, 2022, 2 a.m. OK GNU C++17 TESTS 29 15 0 2200
154799354 flying_doraemon E April 24, 2022, 1:19 a.m. OK GNU C++17 TESTS 29 15 0 2200
154907098 Juang E April 25, 2022, 5:50 a.m. OK GNU C++17 TESTS 29 15 0 2200
154824873 MAOoo_Love_Molly E April 24, 2022, 8:10 a.m. OK GNU C++17 (64) TESTS 29 15 0 2200
154802930 Social_Zhao E April 24, 2022, 2:50 a.m. OK GNU C++17 (64) TESTS 29 15 0 2200
154799981 slenbol E April 24, 2022, 1:37 a.m. OK GNU C++17 (64) TESTS 29 15 0 2200
154841635 isheoran E April 24, 2022, 11:16 a.m. OK GNU C++17 (64) TESTS 29 15 0 2200
154786464 Jobaidul E April 23, 2022, 8:07 p.m. OK GNU C++17 (64) TESTS 29 15 102400 2200
154795085 keep__calm E April 23, 2022, 11:05 p.m. OK GNU C++17 (64) TESTS 29 15 102400 2200
154843852 LiZnB E April 24, 2022, 11:34 a.m. OK GNU C++17 (64) TESTS 29 15 307200 2200
154855616 Ac_love_QWQ E April 24, 2022, 1:21 p.m. OK GNU C++17 (64) TESTS 29 15 819200 2200
154810692 wyh E April 24, 2022, 5:21 a.m. OK GNU C++17 (64) TESTS 29 15 819200 2200
154775056 Roundgod E April 23, 2022, 5:40 p.m. OK GNU C++17 (64) TESTS 28 15 819200 2200
154784920 maxplus E April 23, 2022, 7:42 p.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154846755 CLANNAD_nagisa E April 24, 2022, 11:57 a.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154827254 Baudelaire_ E April 24, 2022, 8:36 a.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154813993 Gromp15 E April 24, 2022, 6:06 a.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154807898 MicroMaker E April 24, 2022, 4:36 a.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154795303 UpDownUpDown E April 23, 2022, 11:11 p.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154784926 maxplus E April 23, 2022, 7:42 p.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154784887 maxplus E April 23, 2022, 7:42 p.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154781358 maxplus E April 23, 2022, 6:50 p.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154781344 maxplus E April 23, 2022, 6:50 p.m. OK GNU C++20 (64) TESTS 29 15 0 2200
154849638 MrOtter E April 24, 2022, 12:23 p.m. OK Java 11 TESTS 29 296 0 2200
154774222 Omar_Mohammad E April 23, 2022, 5:34 p.m. OK Java 11 TESTS 28 311 0 2200
154776301 AndreySiunov E April 23, 2022, 5:50 p.m. OK Java 11 TESTS 28 326 0 2200
154774490 AndreySiunov E April 23, 2022, 5:36 p.m. OK Java 11 TESTS 28 327 0 2200
154816285 profchi E April 24, 2022, 6:34 a.m. OK Java 11 TESTS 29 343 0 2200
154779020 Dukkha E April 23, 2022, 6:19 p.m. OK Java 11 TESTS 29 373 0 2200
154904788 megaspazz E April 25, 2022, 5:03 a.m. OK Java 8 TESTS 29 156 0 2200
154897630 megaspazz E April 25, 2022, 2:18 a.m. OK Java 8 TESTS 29 202 0 2200
154773594 Sparky_Master_WCH1226 E April 23, 2022, 5:30 p.m. OK Kotlin 1.4 TESTS 28 170 0 2200
154871104 Deng1X E April 24, 2022, 3:57 p.m. OK Kotlin 1.4 TESTS 29 187 0 2200
154798506 VC1Z E April 24, 2022, 12:51 a.m. OK MS C++ 2017 TESTS 29 31 48128000 2200
154782589 machine_solution E April 23, 2022, 7:08 p.m. OK MS C++ 2017 TESTS 29 46 204800 2200
154798481 VC1Z E April 24, 2022, 12:50 a.m. OK MS C++ 2017 TESTS 29 46 48128000 2200
154861058 CtrlACtrlV E April 24, 2022, 2:13 p.m. OK MS C++ 2017 TESTS 29 62 0 2200
154774989 titia E April 23, 2022, 5:39 p.m. OK PyPy 3 TESTS 28 218 3993600 2200
154773850 NecroSean38 E April 23, 2022, 5:31 p.m. OK PyPy 3 TESTS 28 233 4608000 2200
154812920 lemiao12 E April 24, 2022, 5:51 a.m. OK PyPy 3 TESTS 29 249 3788800 2200
154774312 whatshisbucket E April 23, 2022, 5:34 p.m. OK PyPy 3 TESTS 28 264 5427200 2200
154775338 Mansurbek E April 23, 2022, 5:42 p.m. OK PyPy 3 TESTS 28 280 6144000 2200
154849604 Neothehero E April 24, 2022, 12:22 p.m. OK PyPy 3-64 TESTS 29 171 5427200 2200
154774794 ai4youej E April 23, 2022, 5:38 p.m. OK PyPy 3-64 TESTS 28 171 5734400 2200
154849176 Neothehero E April 24, 2022, 12:19 p.m. OK PyPy 3-64 TESTS 29 187 5427200 2200
154778824 cofonewbie E April 23, 2022, 6:17 p.m. OK PyPy 3-64 TESTS 28 202 7782400 2200
154774460 cofonewbie E April 23, 2022, 5:36 p.m. OK PyPy 3-64 TESTS 28 202 7987200 2200
154867407 Tinky1224 E April 24, 2022, 3:24 p.m. OK PyPy 3-64 TESTS 29 202 10137600 2200
154797841 sharingan000 E April 24, 2022, 12:29 a.m. OK PyPy 3-64 TESTS 29 217 8396800 2200
154859658 kritarth21 E April 24, 2022, 1:59 p.m. OK PyPy 3-64 TESTS 29 218 6656000 2200
154783797 Kiri8128 E April 23, 2022, 7:25 p.m. OK PyPy 3-64 TESTS 29 218 10342400 2200
154780302 fwtt2 E April 23, 2022, 6:34 p.m. OK PyPy 3-64 TESTS 29 233 9216000 2200
154889355 samriddhjn E April 24, 2022, 8:45 p.m. OK Python 3 TESTS 29 109 0 2200
154780146 fwtt2 E April 23, 2022, 6:32 p.m. OK Python 3 TESTS 29 404 0 2200
154773762 qwerty787788 E April 23, 2022, 5:31 p.m. OK Rust 2021 TESTS 28 78 0 2200

remove filters

Back to search problems