Codeforces Round 934 (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
1944 Codeforces Round 934 (Div. 2) FINISHED False 8700 26580263 March 16, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 24416 ) A Destroying Bridges PROGRAMMING math

B'There are n islands, numbered 1, 2, ldots, n . Initially, every pair of islands is connected by a bridge. Hence, there are a total of frac{n (n - 1)}{2} bridges. Everule lives on island 1 and enjoys visiting the other islands using bridges. Dominater has the power to destroy at most k bridges to minimize the number of islands that Everule can reach using (possibly multiple) bridges. Find the minimum number of islands (including island 1 ) that Everule can visit if Dominater destroys bridges optimally. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^3 ) -- the number of test cases. The description of the test cases follows. The first and only line of each test case contains two integers n and k ( 1 <= n <= 100 , 0 <= k <= frac{n cdot (n - 1)}{2} ). For each test case, output the minimum number of islands that Everule can visit if Dominater destroys bridges optimally. In the first test case, since no bridges can be destroyed, all the islands will be reachable. In the second test case, you can destroy the bridge between islands 1 and 2 . Everule will not be able to visit island 2 but can still visit island 1 . Therefore, the total number of islands that Everule can visit is 1 . In the third test case, Everule always has a way of reaching all islands despite what Dominater does. For example, if Dominater destroyed the bridge between islands 1 and 2 , Everule can still visit island 2 by traveling by 1 to 3 to 2 as the bridges between 1 and 3 , and between 3 and 2 are not destroyed. In the fourth test case, you can destroy all bridges since k = frac{n cdot (n - 1)}{2} . Everule will be only able to visit 1 island (island 1 ). '...

Tutorials

Codeforces Round #934 (Div1, Div2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
251842769 StarSilk A March 17, 2024, 1 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251868415 Alasco A March 17, 2024, 6:01 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251867152 Relax_3 A March 17, 2024, 5:52 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251863144 rd_mishra A March 17, 2024, 5:24 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251862719 Higgsino A March 17, 2024, 5:20 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251860940 srs4929 A March 17, 2024, 5:05 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251858370 abhishek23102 A March 17, 2024, 4:42 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251855446 peymar A March 17, 2024, 4:09 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251843793 CheZiHe929 A March 17, 2024, 1:17 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251843411 LBJyyds A March 17, 2024, 1:11 a.m. OK C++14 (GCC 6-32) TESTS 4 0 0
251866363 1794915535 A March 17, 2024, 5:47 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251867971 Sunij225 A March 17, 2024, 5:58 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251867865 whysitansooo A March 17, 2024, 5:57 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251867344 ridim99 A March 17, 2024, 5:54 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251867329 mojitos A March 17, 2024, 5:54 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251866875 offline-bot A March 17, 2024, 5:51 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251866797 Lazy_Coder. A March 17, 2024, 5:50 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251866735 nitin_kumar_t_27 A March 17, 2024, 5:50 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251866545 ConjectureGuy A March 17, 2024, 5:48 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251866337 AnchalDubey A March 17, 2024, 5:47 a.m. OK C++17 (GCC 7-32) TESTS 4 0 0
251843881 bluemegane A March 17, 2024, 1:19 a.m. OK C# 8 TESTS 4 93 0
251865117 ibrahim30 A March 17, 2024, 5:38 a.m. OK GNU C11 TESTS 4 15 0
251839417 muntasirmuhammad555 A March 17, 2024, 12:01 a.m. OK GNU C11 TESTS 4 15 0
251811525 NightWING2435 A March 16, 2024, 7:10 p.m. OK GNU C11 TESTS 4 15 0
251809090 nabodebroy A March 16, 2024, 6:53 p.m. OK GNU C11 TESTS 4 15 0
251806242 Maisha106 A March 16, 2024, 6:36 p.m. OK GNU C11 TESTS 4 15 0
251791433 karxusee A March 16, 2024, 4:56 p.m. OK GNU C11 TESTS 4 15 0
251783744 RaselNewrass A March 16, 2024, 4:37 p.m. OK GNU C11 TESTS 4 15 0
251790078 Homaira_Jahan128 A March 16, 2024, 4:53 p.m. OK GNU C11 TESTS 4 15 204800
251866909 kamal122 A March 17, 2024, 5:51 a.m. OK GNU C11 TESTS 4 15 307200
251805995 cristiano.07 A March 16, 2024, 6:35 p.m. OK GNU C11 TESTS 4 15 307200
251806527 Amigo_ A March 16, 2024, 6:38 p.m. OK Go TESTS 4 15 102400
251864588 amit_roy A March 17, 2024, 5:34 a.m. OK Java 21 TESTS 4 186 0
251810810 sahilsukhdeve15 A March 16, 2024, 7:05 p.m. OK Java 21 TESTS 4 186 512000
251864693 Mahinr10 A March 17, 2024, 5:35 a.m. OK Java 21 TESTS 4 187 0
251819392 krish0596 A March 16, 2024, 8:13 p.m. OK Java 21 TESTS 4 217 0
251832620 flickflock A March 16, 2024, 10:11 p.m. OK Java 21 TESTS 4 218 0
251810533 chiranjeevi1204 A March 16, 2024, 7:03 p.m. OK Java 21 TESTS 4 218 0
251860443 ChongQY A March 17, 2024, 5:01 a.m. OK Java 21 TESTS 4 233 0
251842080 priyaroy3370 A March 17, 2024, 12:48 a.m. OK Java 21 TESTS 4 233 0
251834570 Sagy13 A March 16, 2024, 10:37 p.m. OK Java 21 TESTS 4 248 0
251819229 krish0596 A March 16, 2024, 8:12 p.m. OK Java 21 TESTS 4 249 0
251848708 51Hz A March 17, 2024, 2:38 a.m. OK Java 8 TESTS 4 124 0
251818025 Sumitsingh7 A March 16, 2024, 8:02 p.m. OK Java 8 TESTS 4 124 5836800
251859464 ChiefPatwal A March 17, 2024, 4:52 a.m. OK Java 8 TESTS 4 139 0
251782341 manish_pravesh A March 16, 2024, 4:34 p.m. OK Java 8 TESTS 4 155 0
251789346 The_Gunner A March 16, 2024, 4:51 p.m. OK Kotlin 1.9 TESTS 4 155 0
251830512 0x81 A March 16, 2024, 9:47 p.m. OK OCaml TESTS 4 15 0
251840342 stackpointer A March 17, 2024, 12:18 a.m. OK OCaml TESTS 4 15 307200
251847604 ow3nL A March 17, 2024, 2:22 a.m. OK PyPy 3 TESTS 4 77 1228800
251807158 Paras2856 A March 16, 2024, 6:42 p.m. OK PyPy 3 TESTS 4 124 2764800
251843511 nealzane A March 17, 2024, 1:12 a.m. OK PyPy 3 TESTS 4 187 5427200
251823781 _aadiupadhyay_ A March 16, 2024, 8:47 p.m. OK PyPy 3-64 TESTS 4 61 614400
251815552 gardengnome A March 16, 2024, 7:40 p.m. OK PyPy 3-64 TESTS 4 61 1638400
251843882 voicon A March 17, 2024, 1:19 a.m. OK PyPy 3-64 TESTS 4 61 1740800
251814737 tanmay1610 A March 16, 2024, 7:34 p.m. OK PyPy 3-64 TESTS 4 61 1945600
251807682 Mohamed_Hamed A March 16, 2024, 6:45 p.m. OK PyPy 3-64 TESTS 4 62 1945600
251863193 RajdeepA A March 17, 2024, 5:24 a.m. OK PyPy 3-64 TESTS 4 62 2048000
251818515 CodePhantom_2104 A March 16, 2024, 8:06 p.m. OK PyPy 3-64 TESTS 4 62 2252800
251859616 sishenzhimu A March 17, 2024, 4:53 a.m. OK PyPy 3-64 TESTS 4 77 1638400
251791008 34z12000 A March 16, 2024, 4:55 p.m. OK PyPy 3-64 TESTS 4 77 1740800
251829354 RobinFromTheHood A March 16, 2024, 9:36 p.m. OK PyPy 3-64 TESTS 4 77 1843200
251807450 OLOGY A March 16, 2024, 6:44 p.m. OK Python 2 TESTS 4 30 0
251840929 Sibtain_1 A March 17, 2024, 12:29 a.m. OK Python 3 TESTS 4 30 0
251801319 eugalt A March 16, 2024, 6:29 p.m. OK Python 3 TESTS 4 30 102400
251859317 manoharsingh2402 A March 17, 2024, 4:51 a.m. OK Python 3 TESTS 4 31 0
251845542 av714 A March 17, 2024, 1:48 a.m. OK Python 3 TESTS 4 31 0
251829603 vatsaltrivedi509 A March 16, 2024, 9:38 p.m. OK Python 3 TESTS 4 31 0
251819614 Ayoooaa A March 16, 2024, 8:15 p.m. OK Python 3 TESTS 4 31 0
251816783 Karim__2 A March 16, 2024, 7:51 p.m. OK Python 3 TESTS 4 31 0
251787683 CMRIT25_21R01A6635 A March 16, 2024, 4:47 p.m. OK Python 3 TESTS 4 31 0
251782507 omen_arslan A March 16, 2024, 4:34 p.m. OK Python 3 TESTS 4 31 0
251805985 eugalt A March 16, 2024, 6:35 p.m. OK Python 3 TESTS 4 31 102400

remove filters

Back to search problems