Codeforces Round 823 (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
1730 Codeforces Round 823 (Div. 2) FINISHED False 7200 73063463 Sept. 25, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23322 ) A Planets PROGRAMMING data structures data structures greedy sortings 800

B"One day, Vogons wanted to build a new hyperspace highway through a distant system with n planets. The i -th planet is on the orbit a_i , there could be multiple planets on the same orbit. It's a pity that all the planets are on the way and need to be destructed. Vogons have two machines to do that. Vogons can use each machine as many times as they want. Vogons are very greedy, so they want to destroy all planets with minimum amount of money spent. Can you help them to know the minimum cost of this project? The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Then the test cases follow. Each test case consists of two lines. The first line contains two integers n and c ( 1 <= n, c <= 100 ) -- the number of planets and the cost of the second machine usage. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 100 ), where a_i is the orbit of the i -th planet. For each test case print a single integer -- the minimum cost of destroying all planets. In the first test case, the cost of using both machines is the same, so you can always use the second one and destroy all planets in orbit 1 , all planets in orbit 2 , all planets in orbit 4 , all planets in orbit 5 . In the second test case, it is advantageous to use the second machine for 2 Triganic Pus to destroy all the planets in orbit 2 , then destroy the remaining two planets using the first machine. In the third test case, you can use the first machine twice or the second machine once. In the fourth test case, it is advantageous to use the first machine twice. "...

Tutorials

Codeforces Round #823 — editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
173522372 bluemegane A Sept. 25, 2022, 10:28 p.m. OK C# 8 TESTS 21 108 1024000 800
173522512 bluemegane A Sept. 25, 2022, 10:32 p.m. OK C# 8 TESTS 21 124 1126400 800
173522325 bluemegane A Sept. 25, 2022, 10:27 p.m. OK C# 8 TESTS 21 124 1228800 800
173537790 acacachhh A Sept. 26, 2022, 4:31 a.m. OK Clang++17 Diagnostics TESTS 21 61 0 800
173526119 Theshuai A Sept. 26, 2022, 12:24 a.m. OK Clang++17 Diagnostics TESTS 21 62 3174400 800
173496703 anasrabhi0 A Sept. 25, 2022, 5:11 p.m. OK GNU C11 TESTS 21 15 0 800
173539577 Cloud09 A Sept. 26, 2022, 5:07 a.m. OK GNU C11 TESTS 21 30 0 800
173485258 puzzlesad A Sept. 25, 2022, 4:15 p.m. OK GNU C11 TESTS 21 30 204800 800
173531424 Partha01853 A Sept. 26, 2022, 2:29 a.m. OK GNU C11 TESTS 21 31 0 800
173540272 Cloud09 A Sept. 26, 2022, 5:18 a.m. OK GNU C11 TESTS 21 31 0 800
173541363 TMJYH09 A Sept. 26, 2022, 5:38 a.m. OK GNU C++14 TESTS 21 15 0 800
173540909 MiniLong A Sept. 26, 2022, 5:29 a.m. OK GNU C++14 TESTS 21 15 0 800
173539721 hnust_liiubingbo A Sept. 26, 2022, 5:09 a.m. OK GNU C++14 TESTS 21 15 0 800
173538461 Ruudddiiii A Sept. 26, 2022, 4:45 a.m. OK GNU C++14 TESTS 21 15 0 800
173537496 Dineshhh A Sept. 26, 2022, 4:25 a.m. OK GNU C++14 TESTS 21 15 0 800
173537228 remmymilkyway A Sept. 26, 2022, 4:20 a.m. OK GNU C++14 TESTS 21 15 0 800
173537166 sleep_b4_cntst A Sept. 26, 2022, 4:19 a.m. OK GNU C++14 TESTS 21 15 0 800
173535721 devang20_20 A Sept. 26, 2022, 3:50 a.m. OK GNU C++14 TESTS 21 15 0 800
173535195 Zhang_Runqi A Sept. 26, 2022, 3:40 a.m. OK GNU C++14 TESTS 21 15 0 800
173541565 omni_man A Sept. 26, 2022, 5:41 a.m. OK GNU C++14 TESTS 21 15 0 800
173540443 sAijaswanth A Sept. 26, 2022, 5:21 a.m. OK GNU C++17 TESTS 21 15 0 800
173539902 agarwal_vaibhav A Sept. 26, 2022, 5:12 a.m. OK GNU C++17 TESTS 21 15 0 800
173539801 kunal.lalwani.cse21 A Sept. 26, 2022, 5:10 a.m. OK GNU C++17 TESTS 21 15 0 800
173539701 linylin A Sept. 26, 2022, 5:09 a.m. OK GNU C++17 TESTS 21 15 0 800
173539217 thesixpathguy A Sept. 26, 2022, 5 a.m. OK GNU C++17 TESTS 21 15 0 800
173540987 ojaschawla14 A Sept. 26, 2022, 5:31 a.m. OK GNU C++17 TESTS 21 15 0 800
173541512 Snow_raw A Sept. 26, 2022, 5:41 a.m. OK GNU C++17 TESTS 21 15 0 800
173541671 strgglr A Sept. 26, 2022, 5:43 a.m. OK GNU C++17 TESTS 21 15 0 800
173542396 infinity020202 A Sept. 26, 2022, 5:55 a.m. OK GNU C++17 TESTS 21 15 0 800
173540634 khajababa A Sept. 26, 2022, 5:24 a.m. OK GNU C++17 TESTS 21 15 0 800
173498253 yaoveil A Sept. 25, 2022, 5:20 p.m. OK GNU C++17 (64) TESTS 21 0 0 800
173541651 OTTFF A Sept. 26, 2022, 5:43 a.m. OK GNU C++17 (64) TESTS 21 0 0 800
173538267 YaoLingF A Sept. 26, 2022, 4:41 a.m. OK GNU C++17 (64) TESTS 21 0 0 800
173532323 BlueFoxyy A Sept. 26, 2022, 2:48 a.m. OK GNU C++17 (64) TESTS 21 0 0 800
173529651 fictitious_love A Sept. 26, 2022, 1:51 a.m. OK GNU C++17 (64) TESTS 21 0 0 800
173526396 cbmano A Sept. 26, 2022, 12:32 a.m. OK GNU C++17 (64) TESTS 21 0 0 800
173523284 HideInTheSea A Sept. 25, 2022, 10:54 p.m. OK GNU C++17 (64) TESTS 21 0 0 800
173499780 watchThis A Sept. 25, 2022, 5:30 p.m. OK GNU C++17 (64) TESTS 21 0 0 800
173498577 osamaBelal A Sept. 25, 2022, 5:22 p.m. OK GNU C++17 (64) TESTS 21 0 0 800
173528372 jason-wang A Sept. 26, 2022, 1:23 a.m. OK GNU C++17 (64) TESTS 21 0 7987200 800
173510922 abdelrahman1020 A Sept. 25, 2022, 7:15 p.m. OK GNU C++20 (64) TESTS 21 0 0 800
173509937 imYaswanthKumar A Sept. 25, 2022, 7:04 p.m. OK GNU C++20 (64) TESTS 21 0 0 800
173507030 Havoc_01 A Sept. 25, 2022, 6:31 p.m. OK GNU C++20 (64) TESTS 21 0 0 800
173504240 Eman_Moh A Sept. 25, 2022, 6:04 p.m. OK GNU C++20 (64) TESTS 21 0 0 800
173500046 rhsajal_017 A Sept. 25, 2022, 5:32 p.m. OK GNU C++20 (64) TESTS 21 0 0 800
173519801 ivatopuria A Sept. 25, 2022, 9:27 p.m. OK GNU C++20 (64) TESTS 21 0 0 800
173530894 dorobou A Sept. 26, 2022, 2:17 a.m. OK GNU C++20 (64) TESTS 21 0 0 800
173541162 xls_is_real_dd A Sept. 26, 2022, 5:34 a.m. OK GNU C++20 (64) TESTS 21 0 0 800
173541440 harshwardhan4k A Sept. 26, 2022, 5:39 a.m. OK GNU C++20 (64) TESTS 21 0 0 800
173515316 mamke A Sept. 25, 2022, 8:15 p.m. OK GNU C++20 (64) TESTS 21 0 0 800
173542416 SpringSwallows A Sept. 26, 2022, 5:55 a.m. OK Java 11 TESTS 21 171 0 800
173534837 garg_lucifer A Sept. 26, 2022, 3:34 a.m. OK Java 11 TESTS 21 171 0 800
173508376 Improbable A Sept. 25, 2022, 6:45 p.m. OK Java 11 TESTS 21 171 0 800
173503315 ramuked A Sept. 25, 2022, 5:57 p.m. OK Java 11 TESTS 21 171 0 800
173497732 mishraadarsh02 A Sept. 25, 2022, 5:17 p.m. OK Java 11 TESTS 21 171 0 800
173519190 Kunal_30 A Sept. 25, 2022, 9:15 p.m. OK Java 11 TESTS 21 186 0 800
173509088 shahvraj1500 A Sept. 25, 2022, 6:53 p.m. OK Java 11 TESTS 21 186 0 800
173496620 SpookyJumpyBeans A Sept. 25, 2022, 5:11 p.m. OK Java 11 TESTS 21 186 0 800
173497023 Yousef_Badr A Sept. 25, 2022, 5:13 p.m. OK Java 11 TESTS 21 187 0 800
173507287 Aman_dixit A Sept. 25, 2022, 6:34 p.m. OK Java 11 TESTS 21 187 15052800 800
173523261 freehandle A Sept. 25, 2022, 10:54 p.m. OK Java 17 TESTS 21 187 204800 800
173525644 nafiulfatta A Sept. 26, 2022, 12:09 a.m. OK Java 17 TESTS 21 202 512000 800
173514712 notah A Sept. 25, 2022, 8:06 p.m. OK Java 17 TESTS 21 202 716800 800
173492378 selenophile A Sept. 25, 2022, 4:34 p.m. OK Java 17 TESTS 21 218 716800 800
173534561 eslamms A Sept. 26, 2022, 3:29 a.m. OK Java 17 TESTS 21 233 1024000 800
173484673 tikava A Sept. 25, 2022, 4:13 p.m. OK Java 17 TESTS 21 249 204800 800
173516969 ankitsmt211 A Sept. 25, 2022, 8:39 p.m. OK Java 17 TESTS 21 265 921600 800
173499519 SanjeevKumarRay A Sept. 25, 2022, 5:28 p.m. OK Java 17 TESTS 21 295 819200 800
173501979 Sussykin A Sept. 25, 2022, 5:46 p.m. OK Java 8 TESTS 21 93 0 800
173496569 Mohamed_A7med A Sept. 25, 2022, 5:10 p.m. OK Java 8 TESTS 21 93 0 800
173499394 manan29 A Sept. 25, 2022, 5:27 p.m. OK Java 8 TESTS 21 108 0 800
173507933 sr93344 A Sept. 25, 2022, 6:41 p.m. OK Java 8 TESTS 21 109 0 800
173509438 darin.m.fadel A Sept. 25, 2022, 6:57 p.m. OK Java 8 TESTS 21 109 0 800
173507851 Kaldaruly A Sept. 25, 2022, 6:40 p.m. OK Java 8 TESTS 21 109 0 800
173504645 BhargavModha A Sept. 25, 2022, 6:08 p.m. OK Java 8 TESTS 21 109 0 800
173502448 akarshanand2810 A Sept. 25, 2022, 5:50 p.m. OK Java 8 TESTS 21 124 0 800
173538296 zhartas A Sept. 26, 2022, 4:42 a.m. OK Java 8 TESTS 21 139 0 800
173526067 leetcodemonk A Sept. 26, 2022, 12:23 a.m. OK Java 8 TESTS 21 140 0 800
173535879 AlgoTurtle A Sept. 26, 2022, 3:53 a.m. OK Mono C# TESTS 21 46 819200 800
173524748 JRose1121 A Sept. 25, 2022, 11:41 p.m. OK MS C++ 2017 TESTS 21 15 0 800
173510087 vanshi-123-egg A Sept. 25, 2022, 7:05 p.m. OK MS C++ 2017 TESTS 21 15 0 800
173510059 cptahahab A Sept. 25, 2022, 7:05 p.m. OK MS C++ 2017 TESTS 21 15 0 800
173492351 hossamhassanabdelrheem A Sept. 25, 2022, 4:34 p.m. OK MS C++ 2017 TESTS 21 15 0 800
173535894 a1984534584 A Sept. 26, 2022, 3:53 a.m. OK MS C++ 2017 TESTS 21 15 0 800
173492880 justhandsome1127 A Sept. 25, 2022, 4:34 p.m. OK MS C++ 2017 TESTS 21 31 0 800
173508822 Nerdium A Sept. 25, 2022, 6:50 p.m. OK MS C++ 2017 TESTS 21 31 0 800
173524497 JRose1121 A Sept. 25, 2022, 11:33 p.m. OK MS C++ 2017 TESTS 21 31 102400 800
173536649 jaytau A Sept. 26, 2022, 4:08 a.m. OK PyPy 3 TESTS 21 108 1638400 800
173538087 amitchaurasiya10279 A Sept. 26, 2022, 4:37 a.m. OK PyPy 3 TESTS 21 108 2150400 800
173514021 teyouale A Sept. 25, 2022, 7:57 p.m. OK PyPy 3 TESTS 21 124 2252800 800
173498073 Smooth_criminal A Sept. 25, 2022, 5:19 p.m. OK PyPy 3-64 TESTS 21 62 2150400 800
173523630 cubicol A Sept. 25, 2022, 11:06 p.m. OK PyPy 3-64 TESTS 21 62 2355200 800
173502011 harshkrraj A Sept. 25, 2022, 5:47 p.m. OK PyPy 3-64 TESTS 21 77 1843200 800
173534865 Youarenotgood A Sept. 26, 2022, 3:34 a.m. OK PyPy 3-64 TESTS 21 77 1945600 800
173500391 crapcode A Sept. 25, 2022, 5:34 p.m. OK PyPy 3-64 TESTS 21 77 1945600 800
173490216 zaharant2009 A Sept. 25, 2022, 4:28 p.m. OK PyPy 3-64 TESTS 21 77 1945600 800
173488752 daminrisho A Sept. 25, 2022, 4:25 p.m. OK PyPy 3-64 TESTS 21 77 2048000 800
173502449 Khushank_one A Sept. 25, 2022, 5:50 p.m. OK PyPy 3-64 TESTS 21 77 2150400 800
173527268 Ice_Bear521 A Sept. 26, 2022, 12:58 a.m. OK PyPy 3-64 TESTS 21 77 2252800 800
173495441 wonderfullea A Sept. 25, 2022, 5:05 p.m. OK PyPy 3-64 TESTS 21 77 2252800 800
173542258 pennymagic156 A Sept. 26, 2022, 5:53 a.m. OK Python 3 TESTS 21 46 0 800
173541828 Zordovolin_99 A Sept. 26, 2022, 5:46 a.m. OK Python 3 TESTS 21 46 0 800
173539418 Abh1 A Sept. 26, 2022, 5:04 a.m. OK Python 3 TESTS 21 46 0 800
173538063 Hemang27 A Sept. 26, 2022, 4:37 a.m. OK Python 3 TESTS 21 46 0 800
173535527 2010030341 A Sept. 26, 2022, 3:46 a.m. OK Python 3 TESTS 21 46 0 800
173534396 shane17 A Sept. 26, 2022, 3:26 a.m. OK Python 3 TESTS 21 46 0 800
173533899 Alucard76 A Sept. 26, 2022, 3:17 a.m. OK Python 3 TESTS 21 46 0 800
173530824 cphdpp A Sept. 26, 2022, 2:16 a.m. OK Python 3 TESTS 21 46 0 800
173525721 Mohamed_Nasr24 A Sept. 26, 2022, 12:12 a.m. OK Python 3 TESTS 21 46 0 800
173523475 Pythonic__Python A Sept. 25, 2022, 11:01 p.m. OK Python 3 TESTS 21 46 0 800
173536059 Lamda_77 A Sept. 26, 2022, 3:56 a.m. OK Ruby 3 TESTS 21 249 102400 800

remove filters

Back to search problems