Codeforces Round 818 (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
1717 Codeforces Round 818 (Div. 2) FINISHED False 7200 75137063 Sept. 2, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14987 ) B Madoka and Underground Competitions PROGRAMMING constructive algorithms greedy 1100

B"Madoka decided to participate in an underground sports programming competition. And there was exactly one task in it: A square table of size n x n , where n is a multiple of k , is called good if only the characters '.' and 'X' are written in it, as well as in any subtable of size 1 x k or k x 1 , there is at least one character 'X'. In other words, among any k consecutive vertical or horizontal cells, there must be at least one containing the character 'X'. Output any good table that has the minimum possible number of characters 'X', and also the symbol 'X' is written in the cell (r, c) . Rows are numbered from 1 to n from top to bottom, columns are numbered from 1 to n from left to right. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Description of the test cases follows. The first and the only line of each test case contains four integers n , k , r , c ( 1 <= n <= 500, 1 <= k <= n, 1 <= r, c <= n ) -- the size of the table, the integer k and the coordinates of the cell, which must contain the character 'X'. It is guaranteed that n is a multiple of k . It is guaranteed that the sum of n over all test cases does not exceed 500 . For each test case, output n lines, each consisting of n characters '.' and 'X', -- the desired table. If there are several answers, then you can output anyone. Let's analyze the first test case. The following tables can be printed as the correct answer: Note that the following table is invalid because cell (3, 2) does not contain the character 'X': In the second test case, the only correct table is: "...

Tutorials

Codeforces Round #818 (Div. 2) Editorial.

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
170689458 BOOGXOAXCA B Sept. 3, 2022, 4:08 a.m. OK GNU C11 TESTS 7 31 0 1100
170645804 ChrisWhite B Sept. 2, 2022, 4:32 p.m. OK GNU C11 TESTS 7 31 102400 1100
170640791 0x0000 B Sept. 2, 2022, 4:19 p.m. OK GNU C++14 TESTS 7 0 0 1100
170685610 12138cba_ B Sept. 3, 2022, 2:57 a.m. OK GNU C++14 TESTS 7 0 204800 1100
170673896 Yousef_Sameh B Sept. 2, 2022, 10:12 p.m. OK GNU C++14 TESTS 7 0 307200 1100
170693834 amit_rcciit B Sept. 3, 2022, 5:15 a.m. OK GNU C++14 TESTS 7 15 0 1100
170691038 avinashrai3101 B Sept. 3, 2022, 4:35 a.m. OK GNU C++14 TESTS 7 15 0 1100
170694049 shacr7 B Sept. 3, 2022, 5:18 a.m. OK GNU C++14 TESTS 7 15 0 1100
170694371 saminsadaf7 B Sept. 3, 2022, 5:22 a.m. OK GNU C++14 TESTS 7 15 0 1100
170690151 tyupsu B Sept. 3, 2022, 4:20 a.m. OK GNU C++14 TESTS 7 15 0 1100
170695110 suraj.xd B Sept. 3, 2022, 5:31 a.m. OK GNU C++14 TESTS 7 15 0 1100
170697030 codeX_infinity B Sept. 3, 2022, 5:56 a.m. OK GNU C++14 TESTS 7 15 0 1100
170682838 cbing B Sept. 3, 2022, 2:03 a.m. OK GNU C++17 TESTS 7 0 0 1100
170665441 professor_04 B Sept. 2, 2022, 7:34 p.m. OK GNU C++17 TESTS 7 0 204800 1100
170672436 Faisal_faisu B Sept. 2, 2022, 9:34 p.m. OK GNU C++17 TESTS 7 0 204800 1100
170675223 kirlos_nabil B Sept. 2, 2022, 10:48 p.m. OK GNU C++17 TESTS 7 0 204800 1100
170678841 gzzz B Sept. 3, 2022, 12:20 a.m. OK GNU C++17 TESTS 7 0 307200 1100
170683552 okbhr209 B Sept. 3, 2022, 2:19 a.m. OK GNU C++17 TESTS 7 0 409600 1100
170664794 AchalGupta17 B Sept. 2, 2022, 7:26 p.m. OK GNU C++17 TESTS 7 0 409600 1100
170684367 king.kohli B Sept. 3, 2022, 2:35 a.m. OK GNU C++17 TESTS 7 0 8294400 1100
170696765 spaul_12 B Sept. 3, 2022, 5:53 a.m. OK GNU C++17 TESTS 7 15 0 1100
170696900 f20190766 B Sept. 3, 2022, 5:54 a.m. OK GNU C++17 TESTS 7 15 0 1100
170666292 amans07 B Sept. 2, 2022, 7:47 p.m. OK GNU C++17 (64) TESTS 7 0 307200 1100
170689166 jisanahmed10667 B Sept. 3, 2022, 4:03 a.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170695586 yet_Wicton B Sept. 3, 2022, 5:37 a.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170685429 of_a7 B Sept. 3, 2022, 2:54 a.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170684053 Coderhxc B Sept. 3, 2022, 2:28 a.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170682925 JCLinux B Sept. 3, 2022, 2:04 a.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170679913 yuhang123 B Sept. 3, 2022, 12:50 a.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170679280 Saikiran_Botla B Sept. 3, 2022, 12:32 a.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170677174 PurpleCrayon B Sept. 2, 2022, 11:35 p.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170666846 par4dox B Sept. 2, 2022, 7:55 p.m. OK GNU C++17 (64) TESTS 7 15 0 1100
170648423 nakshatraexe B Sept. 2, 2022, 4:48 p.m. OK GNU C++20 (64) TESTS 7 0 0 1100
170656322 utkarshag_20 B Sept. 2, 2022, 5:48 p.m. OK GNU C++20 (64) TESTS 7 0 102400 1100
170680194 Vagray B Sept. 3, 2022, 12:58 a.m. OK GNU C++20 (64) TESTS 7 0 204800 1100
170640842 ujjawal_das B Sept. 2, 2022, 4:20 p.m. OK GNU C++20 (64) TESTS 7 0 204800 1100
170683354 mdiqtam B Sept. 3, 2022, 2:14 a.m. OK GNU C++20 (64) TESTS 7 0 204800 1100
170661932 EtchKay B Sept. 2, 2022, 6:50 p.m. OK GNU C++20 (64) TESTS 7 0 307200 1100
170689338 Nea1 B Sept. 3, 2022, 4:06 a.m. OK GNU C++20 (64) TESTS 7 0 307200 1100
170662145 Bench0310 B Sept. 2, 2022, 6:53 p.m. OK GNU C++20 (64) TESTS 7 0 307200 1100
170657031 tolbi B Sept. 2, 2022, 5:56 p.m. OK GNU C++20 (64) TESTS 7 0 307200 1100
170649256 spongebobsquareroot B Sept. 2, 2022, 4:51 p.m. OK GNU C++20 (64) TESTS 7 0 307200 1100
170658814 koqo B Sept. 2, 2022, 6:13 p.m. OK Go TESTS 7 30 0 1100
170668768 princeayush04 B Sept. 2, 2022, 8:26 p.m. OK Java 11 TESTS 7 155 0 1100
170687285 satyaa_78 B Sept. 3, 2022, 3:26 a.m. OK Java 11 TESTS 7 155 0 1100
170680343 aditya2024 B Sept. 3, 2022, 1:02 a.m. OK Java 11 TESTS 7 155 0 1100
170655145 vivek_kumar_gupta B Sept. 2, 2022, 5:37 p.m. OK Java 11 TESTS 7 155 0 1100
170664019 vigneshpillutla B Sept. 2, 2022, 7:15 p.m. OK Java 11 TESTS 7 156 0 1100
170655307 garima3008 B Sept. 2, 2022, 5:39 p.m. OK Java 11 TESTS 7 156 0 1100
170654271 yudi23 B Sept. 2, 2022, 5:29 p.m. OK Java 11 TESTS 7 156 0 1100
170648294 nis1234 B Sept. 2, 2022, 4:47 p.m. OK Java 11 TESTS 7 156 0 1100
170663848 dpsn743 B Sept. 2, 2022, 7:13 p.m. OK Java 11 TESTS 7 171 0 1100
170653741 samitdas03 B Sept. 2, 2022, 5:24 p.m. OK Java 11 TESTS 7 171 0 1100
170661673 Pratham2908 B Sept. 2, 2022, 6:47 p.m. OK Java 17 TESTS 7 186 409600 1100
170657888 Ali04 B Sept. 2, 2022, 6:04 p.m. OK Java 17 TESTS 7 187 307200 1100
170643354 Mamimi B Sept. 2, 2022, 4:26 p.m. OK Java 17 TESTS 7 218 102400 1100
170641338 luke.nguyen B Sept. 2, 2022, 4:21 p.m. OK Java 17 TESTS 7 218 307200 1100
170641806 CharonXin B Sept. 2, 2022, 4:22 p.m. OK Java 17 TESTS 7 841 0 1100
170650291 Abhishek_821023 B Sept. 2, 2022, 4:57 p.m. OK Java 17 TESTS 7 904 716800 1100
170651033 _spiralJava_ B Sept. 2, 2022, 5:02 p.m. OK Java 17 TESTS 7 920 307200 1100
170650924 Rishav_Kumar249 B Sept. 2, 2022, 5:02 p.m. OK Java 17 TESTS 7 920 921600 1100
170642139 AdityaGupta19 B Sept. 2, 2022, 4:23 p.m. OK Java 17 TESTS 7 951 204800 1100
170649670 Abhishek_821023 B Sept. 2, 2022, 4:54 p.m. OK Java 17 TESTS 7 951 307200 1100
170677035 leonlian B Sept. 2, 2022, 11:32 p.m. OK Java 8 TESTS 7 93 0 1100
170673502 karamkontar B Sept. 2, 2022, 10 p.m. OK Java 8 TESTS 7 93 0 1100
170659257 ankit_0207 B Sept. 2, 2022, 6:18 p.m. OK Java 8 TESTS 7 93 0 1100
170658875 ankit_0207 B Sept. 2, 2022, 6:14 p.m. OK Java 8 TESTS 7 93 0 1100
170654837 Lyashenko B Sept. 2, 2022, 5:34 p.m. OK Java 8 TESTS 7 93 0 1100
170651021 AFouad204 B Sept. 2, 2022, 5:02 p.m. OK Java 8 TESTS 7 93 0 1100
170650730 Mohamed_A7med B Sept. 2, 2022, 5 p.m. OK Java 8 TESTS 7 93 0 1100
170650600 UzmakiNaruto B Sept. 2, 2022, 4:59 p.m. OK Java 8 TESTS 7 93 0 1100
170649391 arutsudar B Sept. 2, 2022, 4:52 p.m. OK Java 8 TESTS 7 93 0 1100
170686292 ganesh_6 B Sept. 3, 2022, 3:09 a.m. OK Java 8 TESTS 7 108 0 1100
170654627 _gyunghoe_ B Sept. 2, 2022, 5:32 p.m. OK Kotlin 1.6 TESTS 7 233 921600 1100
170670589 shek_shek B Sept. 2, 2022, 8:57 p.m. OK Kotlin 1.6 TESTS 7 967 0 1100
170654312 hamed053 B Sept. 2, 2022, 5:29 p.m. OK MS C++ 2017 TESTS 7 15 0 1100
170650305 the_tudz B Sept. 2, 2022, 4:57 p.m. OK MS C++ 2017 TESTS 7 15 0 1100
170644359 Mindaev_Damir B Sept. 2, 2022, 4:29 p.m. OK MS C++ 2017 TESTS 7 15 1331200 1100
170689433 6ziv B Sept. 3, 2022, 4:08 a.m. OK MS C++ 2017 TESTS 7 31 0 1100
170659276 Rhnvrma B Sept. 2, 2022, 6:18 p.m. OK MS C++ 2017 TESTS 7 31 0 1100
170645866 vk880511 B Sept. 2, 2022, 4:32 p.m. OK MS C++ 2017 TESTS 7 31 0 1100
170695134 wawawawa1 B Sept. 3, 2022, 5:32 a.m. OK MS C++ 2017 TESTS 7 31 307200 1100
170652472 1_shivam B Sept. 2, 2022, 5:14 p.m. OK MS C++ 2017 TESTS 7 31 307200 1100
170669155 gkukanov B Sept. 2, 2022, 8:32 p.m. OK MS C++ 2017 TESTS 7 31 819200 1100
170646148 NikitinEg B Sept. 2, 2022, 4:33 p.m. OK MS C++ 2017 TESTS 7 31 1024000 1100
170648296 1_2_3_4_5_9 B Sept. 2, 2022, 4:47 p.m. OK PyPy 2 TESTS 7 202 8089600 1100
170644532 Martian2024 B Sept. 2, 2022, 4:29 p.m. OK PyPy 3 TESTS 7 92 409600 1100
170652111 edward0414 B Sept. 2, 2022, 5:11 p.m. OK PyPy 3 TESTS 7 93 1740800 1100
170661511 MegaCharizrdZ B Sept. 2, 2022, 6:45 p.m. OK PyPy 3 TESTS 7 93 3891200 1100
170670512 kang-fu B Sept. 2, 2022, 8:56 p.m. OK PyPy 3 TESTS 7 108 1740800 1100
170674068 SIGCHLD B Sept. 2, 2022, 10:16 p.m. OK PyPy 3 TESTS 7 108 3174400 1100
170690951 kraanzu B Sept. 3, 2022, 4:34 a.m. OK PyPy 3 TESTS 7 108 69017600 1100
170655905 abhipandey9315 B Sept. 2, 2022, 5:44 p.m. OK PyPy 3 TESTS 7 140 2457600 1100
170697425 MohammadsadraSedighin B Sept. 3, 2022, 6:01 a.m. OK PyPy 3 TESTS 7 155 9625600 1100
170658672 saber_LJY B Sept. 2, 2022, 6:12 p.m. OK PyPy 3 TESTS 7 342 11366400 1100
170651005 aniketabhiraj2004 B Sept. 2, 2022, 5:02 p.m. OK PyPy 3-64 TESTS 7 61 102400 1100
170640328 Sahilence B Sept. 2, 2022, 4:18 p.m. OK PyPy 3-64 TESTS 7 62 409600 1100
170657817 TENY B Sept. 2, 2022, 6:03 p.m. OK PyPy 3-64 TESTS 7 62 1638400 1100
170654326 Ripper711 B Sept. 2, 2022, 5:29 p.m. OK PyPy 3-64 TESTS 7 62 2355200 1100
170644244 SilverGodly B Sept. 2, 2022, 4:28 p.m. OK PyPy 3-64 TESTS 7 62 3379200 1100
170652048 Ele_1 B Sept. 2, 2022, 5:10 p.m. OK PyPy 3-64 TESTS 7 62 3788800 1100
170649704 nosok_dikobraza B Sept. 2, 2022, 4:54 p.m. OK PyPy 3-64 TESTS 7 62 3993600 1100
170649009 tonyabraham115 B Sept. 2, 2022, 4:50 p.m. OK PyPy 3-64 TESTS 7 62 4096000 1100
170650911 AfsanHabib B Sept. 2, 2022, 5:02 p.m. OK PyPy 3-64 TESTS 7 62 4198400 1100
170674882 Mayank_Bad B Sept. 2, 2022, 10:38 p.m. OK PyPy 3-64 TESTS 7 62 4300800 1100
170651298 eugalt B Sept. 2, 2022, 5:04 p.m. OK Python 3 TESTS 7 31 0 1100
170672882 jen4jain B Sept. 2, 2022, 9:45 p.m. OK Python 3 TESTS 7 46 0 1100
170653422 minochaji B Sept. 2, 2022, 5:21 p.m. OK Python 3 TESTS 7 46 0 1100
170652555 eugalt B Sept. 2, 2022, 5:14 p.m. OK Python 3 TESTS 7 46 0 1100
170652106 eugalt B Sept. 2, 2022, 5:11 p.m. OK Python 3 TESTS 7 46 0 1100
170640705 SM16 B Sept. 2, 2022, 4:19 p.m. OK Python 3 TESTS 7 46 0 1100
170643600 st.affeev B Sept. 2, 2022, 4:27 p.m. OK Python 3 TESTS 7 46 204800 1100
170658214 The1Sign B Sept. 2, 2022, 6:07 p.m. OK Python 3 TESTS 7 46 716800 1100
170642702 M7moud_Ala3rj B Sept. 2, 2022, 4:24 p.m. OK Python 3 TESTS 7 46 716800 1100
170686529 VaibhavLahane B Sept. 3, 2022, 3:13 a.m. OK Python 3 TESTS 7 46 1024000 1100
170671424 kena0ki B Sept. 2, 2022, 9:14 p.m. OK Rust 2021 TESTS 7 0 307200 1100
170676460 Svlad_Cjelli B Sept. 2, 2022, 11:17 p.m. OK Rust 2021 TESTS 7 15 0 1100
170679268 Spheniscine B Sept. 3, 2022, 12:32 a.m. OK Rust 2021 TESTS 7 15 102400 1100

remove filters

Back to search problems