Educational Codeforces Round 138 (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
1749 Educational Codeforces Round 138 (Rated for Div. 2) FINISHED False 7200 65546699 Oct. 20, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22393 ) A Cowardly Rooks PROGRAMMING implementation

B'There 's a chessboard of size n x n . m rooks are placed on it in such a way that: A rook attacks all cells that are in its row or column. Is it possible to move exactly one rook (you can choose which one to move) into a different cell so that no two rooks still attack each other? A rook can move into any cell in its row or column if no other rook stands on its path. The first line contains a single integer t ( 1 <= t <= 2000 ) -- the number of testcases. The first line of each testcase contains two integers n and m ( 1 <= n, m <= 8 ) -- the size of the chessboard and the number of the rooks. The i -th of the next m lines contains two integers x_i and y_i ( 1 <= x_i, y_i <= n ) -- the position of the i -th rook: x_i is the row and y_i is the column. No two rooks occupy the same cell. No two rooks attack each other. For each testcase, print "YES" if it 's possible to move exactly one rook into a different cell so that no two rooks still attack each other. Otherwise, print "NO". In the first testcase, the rooks are in the opposite corners of a 2 x 2 board. Each of them has a move into a neighbouring corner, but moving there means getting attacked by another rook. In the second testcase, there 's a single rook in a middle of a 3 x 3 board. It has 4 valid moves, and every move is fine because there 's no other rook to attack it. '...

Tutorials

108269

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
177220762 christ94 A Oct. 20, 2022, 5:38 p.m. OK Clang++17 Diagnostics TESTS 2 46 0
177211811 Sarvagna_30405 A Oct. 20, 2022, 4:38 p.m. OK Clang++17 Diagnostics TESTS 2 77 0
177254522 Wlf0000 A Oct. 21, 2022, 3:35 a.m. OK Clang++20 Diagnostics TESTS 2 46 0
177218153 SwS697 A Oct. 20, 2022, 5:16 p.m. OK Clang++20 Diagnostics TESTS 2 46 0
177235018 danpfei02 A Oct. 20, 2022, 8:26 p.m. OK Clang++20 Diagnostics TESTS 2 61 40345600
177262741 rounak2k19sharma A Oct. 21, 2022, 5:41 a.m. OK GNU C11 TESTS 2 0 0
177245729 Ap0stoL A Oct. 21, 2022, 12:30 a.m. OK GNU C11 TESTS 2 0 0
177223733 noobatcode007 A Oct. 20, 2022, 6:05 p.m. OK GNU C11 TESTS 2 15 0
177254886 fahim40 A Oct. 21, 2022, 3:41 a.m. OK GNU C11 TESTS 2 15 0
177216301 sayakbhattacharya18 A Oct. 20, 2022, 5:03 p.m. OK GNU C11 TESTS 2 15 0
177262042 za_rrr23 A Oct. 21, 2022, 5:33 a.m. OK GNU C11 TESTS 2 15 0
177232665 namanpahwa20 A Oct. 20, 2022, 7:51 p.m. OK GNU C11 TESTS 2 15 0
177233636 abhinav55576 A Oct. 20, 2022, 8:06 p.m. OK GNU C11 TESTS 2 15 0
177246914 Leasier A Oct. 21, 2022, 1:01 a.m. OK GNU C11 TESTS 2 15 0
177250615 coolchicken A Oct. 21, 2022, 2:24 a.m. OK GNU C11 TESTS 2 15 0
177259599 Rishabh_Abhishek A Oct. 21, 2022, 5 a.m. OK GNU C++14 TESTS 2 0 0
177257346 a_manglani A Oct. 21, 2022, 4:23 a.m. OK GNU C++14 TESTS 2 0 0
177257000 suyash2_3 A Oct. 21, 2022, 4:17 a.m. OK GNU C++14 TESTS 2 0 0
177255680 sachinkumardbg766 A Oct. 21, 2022, 3:53 a.m. OK GNU C++14 TESTS 2 0 0
177253490 hereiszd A Oct. 21, 2022, 3:17 a.m. OK GNU C++14 TESTS 2 0 0
177253255 paranoid_noob A Oct. 21, 2022, 3:13 a.m. OK GNU C++14 TESTS 2 0 0
177263894 dhairya_3 A Oct. 21, 2022, 5:56 a.m. OK GNU C++14 TESTS 2 0 0
177262955 Abusaid_mohammad_75 A Oct. 21, 2022, 5:44 a.m. OK GNU C++14 TESTS 2 0 0
177261159 BuxiZhou9 A Oct. 21, 2022, 5:21 a.m. OK GNU C++14 TESTS 2 0 0
177260353 Sairaj_99 A Oct. 21, 2022, 5:11 a.m. OK GNU C++14 TESTS 2 0 0
177259497 adarshagrahari0503 A Oct. 21, 2022, 4:58 a.m. OK GNU C++17 TESTS 2 0 0
177259940 Sobhan_Mridha A Oct. 21, 2022, 5:05 a.m. OK GNU C++17 TESTS 2 0 0
177260273 kjniharika A Oct. 21, 2022, 5:09 a.m. OK GNU C++17 TESTS 2 0 0
177260767 IUseArchBTW A Oct. 21, 2022, 5:16 a.m. OK GNU C++17 TESTS 2 0 0
177260920 zweix A Oct. 21, 2022, 5:18 a.m. OK GNU C++17 TESTS 2 0 0
177263498 Kanta_70 A Oct. 21, 2022, 5:51 a.m. OK GNU C++17 TESTS 2 0 0
177259183 QuangBuiCP A Oct. 21, 2022, 4:53 a.m. OK GNU C++17 TESTS 2 0 0
177259091 alonesoul A Oct. 21, 2022, 4:52 a.m. OK GNU C++17 TESTS 2 0 0
177258396 Dev-i_varaprasad A Oct. 21, 2022, 4:41 a.m. OK GNU C++17 TESTS 2 0 0
177258269 JaSn_rocX A Oct. 21, 2022, 4:38 a.m. OK GNU C++17 TESTS 2 0 0
177264098 sgmft A Oct. 21, 2022, 5:58 a.m. OK GNU C++17 (64) TESTS 2 0 0
177260392 tsukiko_tsutsukakushi A Oct. 21, 2022, 5:11 a.m. OK GNU C++17 (64) TESTS 2 0 0
177254957 -Victory A Oct. 21, 2022, 3:42 a.m. OK GNU C++17 (64) TESTS 2 0 0
177253818 FangYifan A Oct. 21, 2022, 3:23 a.m. OK GNU C++17 (64) TESTS 2 0 0
177252173 PurpleCrayon A Oct. 21, 2022, 2:53 a.m. OK GNU C++17 (64) TESTS 2 0 0
177250112 Fan_zf A Oct. 21, 2022, 2:14 a.m. OK GNU C++17 (64) TESTS 2 0 0
177249048 Time_JYF A Oct. 21, 2022, 1:51 a.m. OK GNU C++17 (64) TESTS 2 0 0
177246589 YaliCai A Oct. 21, 2022, 12:53 a.m. OK GNU C++17 (64) TESTS 2 0 0
177246377 Awesome3.14 A Oct. 21, 2022, 12:48 a.m. OK GNU C++17 (64) TESTS 2 0 0
177246160 hhh3 A Oct. 21, 2022, 12:42 a.m. OK GNU C++17 (64) TESTS 2 0 0
177262152 simpaa A Oct. 21, 2022, 5:34 a.m. OK GNU C++20 (64) TESTS 2 0 0
177262426 ArPiT_PanDeY A Oct. 21, 2022, 5:38 a.m. OK GNU C++20 (64) TESTS 2 0 0
177262964 andreea_eliza A Oct. 21, 2022, 5:44 a.m. OK GNU C++20 (64) TESTS 2 0 0
177263208 vedant_1 A Oct. 21, 2022, 5:47 a.m. OK GNU C++20 (64) TESTS 2 0 0
177263479 shahrina_sabrin A Oct. 21, 2022, 5:51 a.m. OK GNU C++20 (64) TESTS 2 0 0
177263665 HodaKamal A Oct. 21, 2022, 5:53 a.m. OK GNU C++20 (64) TESTS 2 0 0
177263722 JakLee A Oct. 21, 2022, 5:54 a.m. OK GNU C++20 (64) TESTS 2 0 0
177263961 Pravendra_235 A Oct. 21, 2022, 5:56 a.m. OK GNU C++20 (64) TESTS 2 0 0
177264154 pradeep A Oct. 21, 2022, 5:59 a.m. OK GNU C++20 (64) TESTS 2 0 0
177264393 lqsandhua A Oct. 21, 2022, 6:01 a.m. OK GNU C++20 (64) TESTS 2 0 0
177257985 vietanhduong A Oct. 21, 2022, 4:33 a.m. OK Go TESTS 2 15 102400
177246550 pepradere A Oct. 21, 2022, 12:53 a.m. OK Go TESTS 2 15 307200
177215529 enuguru_2002 A Oct. 20, 2022, 4:57 p.m. OK Java 11 TESTS 2 155 0
177263539 amritagg_ A Oct. 21, 2022, 5:51 a.m. OK Java 11 TESTS 2 155 0
177260203 T_PAVAN_NAGARAJU A Oct. 21, 2022, 5:09 a.m. OK Java 11 TESTS 2 155 0
177235048 doomhammer. A Oct. 20, 2022, 8:26 p.m. OK Java 11 TESTS 2 155 0
177227849 princeayush04 A Oct. 20, 2022, 6:48 p.m. OK Java 11 TESTS 2 155 0
177222195 peiyeliu A Oct. 20, 2022, 5:51 p.m. OK Java 11 TESTS 2 155 0
177212833 Spidey2182 A Oct. 20, 2022, 4:42 p.m. OK Java 11 TESTS 2 155 0
177225145 white_harmony A Oct. 20, 2022, 6:20 p.m. OK Java 11 TESTS 2 156 0
177259651 NithinBharathi A Oct. 21, 2022, 5:01 a.m. OK Java 11 TESTS 2 170 0
177256571 kowai_ A Oct. 21, 2022, 4:09 a.m. OK Java 11 TESTS 2 170 40345600
177258617 anuragkr898 A Oct. 21, 2022, 4:44 a.m. OK Java 17 TESTS 2 124 0
177212018 Eslam_Ahmed A Oct. 20, 2022, 4:39 p.m. OK Java 17 TESTS 2 139 0
177232480 AkashwaniDbg A Oct. 20, 2022, 7:49 p.m. OK Java 17 TESTS 2 155 0
177202562 dinat_jahan A Oct. 20, 2022, 4:14 p.m. OK Java 17 TESTS 2 155 716800
177262472 tony4875 A Oct. 21, 2022, 5:38 a.m. OK Java 17 TESTS 2 171 102400
177246240 IceWolf898 A Oct. 21, 2022, 12:45 a.m. OK Java 17 TESTS 2 186 0
177206416 code_my_way123 A Oct. 20, 2022, 4:24 p.m. OK Java 17 TESTS 2 187 102400
177240630 Deiaa_Mohmed A Oct. 20, 2022, 10:06 p.m. OK Java 17 TESTS 2 202 0
177244119 deiaa_shutiiig-2- A Oct. 20, 2022, 11:48 p.m. OK Java 17 TESTS 2 202 0
177253065 smlj A Oct. 21, 2022, 3:09 a.m. OK Java 17 TESTS 2 202 716800
177221473 adi_7861 A Oct. 20, 2022, 5:44 p.m. OK Java 8 TESTS 2 62 0
177247758 MerickBao A Oct. 21, 2022, 1:20 a.m. OK Java 8 TESTS 2 77 0
177222959 Mohamed_A7med A Oct. 20, 2022, 5:58 p.m. OK Java 8 TESTS 2 77 0
177240473 OmarKenawi A Oct. 20, 2022, 10:02 p.m. OK Java 8 TESTS 2 78 0
177230193 Omar-Tamer A Oct. 20, 2022, 7:17 p.m. OK Java 8 TESTS 2 78 0
177211498 Omar-Tamer A Oct. 20, 2022, 4:37 p.m. OK Java 8 TESTS 2 78 0
177256979 shynkaaaa A Oct. 21, 2022, 4:17 a.m. OK Java 8 TESTS 2 93 0
177253384 kausanubhav2018 A Oct. 21, 2022, 3:15 a.m. OK Java 8 TESTS 2 93 0
177213380 ikillmyself A Oct. 20, 2022, 4:45 p.m. OK Java 8 TESTS 2 108 0
177223361 tmazumdar A Oct. 20, 2022, 6:02 p.m. OK Java 8 TESTS 2 109 0
177212169 Sgyun A Oct. 20, 2022, 4:39 p.m. OK Kotlin 1.6 TESTS 2 217 0
177254021 cin_ny A Oct. 21, 2022, 3:27 a.m. OK MS C++ 2017 TESTS 2 15 0
177252246 aithongminhhon11804 A Oct. 21, 2022, 2:54 a.m. OK MS C++ 2017 TESTS 2 15 0
177248037 sigma69 A Oct. 21, 2022, 1:27 a.m. OK MS C++ 2017 TESTS 2 15 0
177226226 abdulkader_haffar A Oct. 20, 2022, 6:31 p.m. OK MS C++ 2017 TESTS 2 15 0
177225156 comprock15 A Oct. 20, 2022, 6:20 p.m. OK MS C++ 2017 TESTS 2 15 0
177221435 atul_21 A Oct. 20, 2022, 5:44 p.m. OK MS C++ 2017 TESTS 2 15 0
177206562 X.Gan A Oct. 20, 2022, 4:24 p.m. OK MS C++ 2017 TESTS 2 15 0
177205997 lbj1723265730 A Oct. 20, 2022, 4:23 p.m. OK MS C++ 2017 TESTS 2 15 0
177203143 MEGAvova2005 A Oct. 20, 2022, 4:15 p.m. OK MS C++ 2017 TESTS 2 15 0
177248122 Ichronus A Oct. 21, 2022, 1:29 a.m. OK MS C++ 2017 TESTS 2 30 0
177250354 Unknown_OP A Oct. 21, 2022, 2:18 a.m. OK Perl TESTS 2 15 0
177217739 rsFalse A Oct. 20, 2022, 5:13 p.m. OK Perl TESTS 2 15 0
177217344 manishjha91 A Oct. 20, 2022, 5:10 p.m. OK PyPy 3 TESTS 2 124 3891200
177264529 ca3sar1204 A Oct. 21, 2022, 6:03 a.m. OK PyPy 3 TESTS 2 124 12288000
177247355 hxu10 A Oct. 21, 2022, 1:11 a.m. OK PyPy 3 TESTS 2 140 5324800
177239711 SeuT A Oct. 20, 2022, 9:45 p.m. OK PyPy 3 TESTS 2 233 7372800
177218813 zenith_007 A Oct. 20, 2022, 5:22 p.m. OK PyPy 3 TESTS 2 248 6963200
177215820 anupam_sudh A Oct. 20, 2022, 4:59 p.m. OK PyPy 3 TESTS 2 265 8704000
177227721 tushar_2658 A Oct. 20, 2022, 6:47 p.m. OK PyPy 3 TESTS 2 295 8192000
177217334 jaytau A Oct. 20, 2022, 5:10 p.m. OK PyPy 3 TESTS 2 296 9216000
177246358 samchen123 A Oct. 21, 2022, 12:48 a.m. OK PyPy 3-64 TESTS 2 61 3788800
177241657 ASawe2.6Main A Oct. 20, 2022, 10:33 p.m. OK PyPy 3-64 TESTS 2 77 5529600
177243299 _rahul11_ A Oct. 20, 2022, 11:22 p.m. OK PyPy 3-64 TESTS 2 77 5632000
177217239 deepaklaksman A Oct. 20, 2022, 5:09 p.m. OK PyPy 3-64 TESTS 2 77 5939200
177252329 kuangren777 A Oct. 21, 2022, 2:56 a.m. OK PyPy 3-64 TESTS 2 77 7372800
177256265 nealzane A Oct. 21, 2022, 4:04 a.m. OK PyPy 3-64 TESTS 2 77 8089600
177222867 biglunchdude A Oct. 20, 2022, 5:57 p.m. OK PyPy 3-64 TESTS 2 93 5222400
177252092 kuangren777 A Oct. 21, 2022, 2:51 a.m. OK PyPy 3-64 TESTS 2 93 6860800
177252891 kuangren777 A Oct. 21, 2022, 3:06 a.m. OK PyPy 3-64 TESTS 2 93 7270400
177252352 kuangren777 A Oct. 21, 2022, 2:56 a.m. OK PyPy 3-64 TESTS 2 93 7372800
177259255 Vishal_maha A Oct. 21, 2022, 4:55 a.m. OK Python 3 TESTS 2 46 0
177256872 mr.bippen A Oct. 21, 2022, 4:15 a.m. OK Python 3 TESTS 2 46 0
177253089 Lucky7Star A Oct. 21, 2022, 3:10 a.m. OK Python 3 TESTS 2 46 0
177249424 Shah.Zaib A Oct. 21, 2022, 1:59 a.m. OK Python 3 TESTS 2 46 0
177248170 Shuja_SundarSTEM A Oct. 21, 2022, 1:30 a.m. OK Python 3 TESTS 2 46 0
177232856 Lord_RG A Oct. 20, 2022, 7:54 p.m. OK Python 3 TESTS 2 46 0
177230726 Pythonic__Python A Oct. 20, 2022, 7:25 p.m. OK Python 3 TESTS 2 46 0
177217028 juandavidarce A Oct. 20, 2022, 5:08 p.m. OK Python 3 TESTS 2 46 0
177216247 Crashman_PK A Oct. 20, 2022, 5:02 p.m. OK Python 3 TESTS 2 46 0
177215048 gabrielbonifacio A Oct. 20, 2022, 4:55 p.m. OK Python 3 TESTS 2 46 0
177250887 Unknown_OP A Oct. 21, 2022, 2:29 a.m. OK Ruby 3 TESTS 2 233 102400
177252615 Sempr A Oct. 21, 2022, 3:01 a.m. OK Rust 2021 TESTS 2 0 102400
177252601 zouyu963l A Oct. 21, 2022, 3 a.m. OK Rust 2021 TESTS 2 0 102400
177223073 freshnewname A Oct. 20, 2022, 5:59 p.m. OK Rust 2021 TESTS 2 0 2048000
177242170 IorMemorE A Oct. 20, 2022, 10:47 p.m. OK Rust 2021 TESTS 2 15 0
177241136 IorMemorE A Oct. 20, 2022, 10:19 p.m. OK Rust 2021 TESTS 2 15 0

remove filters

Back to search problems