Codeforces Round 797 (Div. 3)

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
1690 Codeforces Round 797 (Div. 3) FINISHED False 8100 82653863 June 7, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 34003 ) A Print a Pedestal (Codeforces logo?) PROGRAMMING constructive algorithms greedy 800

B'Given the integer n -- the number of available blocks. You must use all blocks to build a pedestal. The pedestal consists of 3 platforms for 2 -nd, 1 -st and 3 -rd places respectively. The platform for the 1 -st place must be strictly higher than for the 2 -nd place, and the platform for the 2 -nd place must be strictly higher than for the 3 -rd place. Also, the height of each platform must be greater than zero (that is, each platform must contain at least one block). Among all possible pedestals of n blocks, deduce one such that the platform height for the 1 -st place minimum as possible. If there are several of them, output any of them. The first line of input data contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case contains a single integer n ( 6 <= n <= 10^5 ) -- the total number of blocks for the pedestal. All n blocks must be used. It is guaranteed that the sum of n values over all test cases does not exceed 10^6 . For each test case, output 3 numbers h_2, h_1, h_3 -- the platform heights for 2 -nd, 1 -st and 3 -rd places on a pedestal consisting of n blocks ( h_1+h_2+h_3=n , 0 < h_3 < h_2 < h_1 ). Among all possible pedestals, output the one for which the value of h_1 minimal. If there are several of them, output any of them. In the first test case we can not get the height of the platform for the first place less than 5 , because if the height of the platform for the first place is not more than 4 , then we can use at most 4 + 3 + 2 = 9 blocks. And we should use 11 = 4 + 5 + 2 blocks. Therefore, the answer 4 5 2 fits. In the second set, the only suitable answer is: 2 3 1. '...

Tutorials

Codeforces Round #797 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
159926342 razzor.20 A June 8, 2022, 10:34 a.m. OK C# 10 TESTS 13 61 1126400 800
159928776 GRANNY_1015 A June 8, 2022, 11:03 a.m. OK Clang++17 Diagnostics TESTS 13 31 0 800
159987995 Tsoding A June 9, 2022, 5:26 a.m. OK Clang++17 Diagnostics TESTS 13 140 0 800
159904443 mnik A June 8, 2022, 6:12 a.m. OK GNU C11 TESTS 13 15 0 800
159933079 Aditya_chandel731 A June 8, 2022, 11:50 a.m. OK GNU C11 TESTS 13 31 0 800
159966147 shakil_ice A June 8, 2022, 6:41 p.m. OK GNU C11 TESTS 13 46 0 800
159936818 yibaiyi20 A June 8, 2022, 12:32 p.m. OK GNU C11 TESTS 13 46 0 800
159984602 F._Rabbi_Rithik A June 9, 2022, 4:11 a.m. OK GNU C11 TESTS 13 46 0 800
159968217 shakil_ice A June 8, 2022, 7:16 p.m. OK GNU C11 TESTS 13 46 0 800
159937185 XiaoDou A June 8, 2022, 12:36 p.m. OK GNU C11 TESTS 13 46 0 800
159937522 yibaiyi20 A June 8, 2022, 12:40 p.m. OK GNU C11 TESTS 13 46 0 800
159937996 Nightmarexx1 A June 8, 2022, 12:46 p.m. OK GNU C11 TESTS 13 46 0 800
159948788 g.Host A June 8, 2022, 2:52 p.m. OK GNU C11 TESTS 13 46 0 800
159982409 levi_17 A June 9, 2022, 3:14 a.m. OK GNU C++14 TESTS 13 15 0 800
159987743 Wilbert1124 A June 9, 2022, 5:21 a.m. OK GNU C++14 TESTS 13 15 0 800
159987544 Lin_YuHuai A June 9, 2022, 5:18 a.m. OK GNU C++14 TESTS 13 15 0 800
159986169 ghffghg A June 9, 2022, 4:51 a.m. OK GNU C++14 TESTS 13 15 0 800
159984045 adhm157 A June 9, 2022, 3:57 a.m. OK GNU C++14 TESTS 13 15 0 800
159980558 alkido A June 9, 2022, 2:16 a.m. OK GNU C++14 TESTS 13 15 0 800
159980099 Mod_zero A June 9, 2022, 1:59 a.m. OK GNU C++14 TESTS 13 15 0 800
159979530 WeiHaoTian A June 9, 2022, 1:39 a.m. OK GNU C++14 TESTS 13 15 0 800
159978304 haiender288 A June 9, 2022, 12:54 a.m. OK GNU C++14 TESTS 13 15 0 800
159977923 xueyan A June 9, 2022, 12:35 a.m. OK GNU C++14 TESTS 13 15 0 800
159990066 Khizri A June 9, 2022, 6:02 a.m. OK GNU C++17 TESTS 13 0 0 800
159975624 marwaa123 A June 8, 2022, 10:42 p.m. OK GNU C++17 TESTS 13 0 0 800
159977639 RSA00 A June 9, 2022, 12:23 a.m. OK GNU C++17 TESTS 13 0 0 800
159984452 diegoximenes A June 9, 2022, 4:08 a.m. OK GNU C++17 TESTS 13 0 0 800
159924644 penguin72487 A June 8, 2022, 10:13 a.m. OK GNU C++17 TESTS 13 0 0 800
159951484 Tushar_Roy A June 8, 2022, 3:28 p.m. OK GNU C++17 TESTS 13 0 0 800
159953822 Pranto_ A June 8, 2022, 3:58 p.m. OK GNU C++17 TESTS 13 0 0 800
159988678 sujayawale125 A June 9, 2022, 5:38 a.m. OK GNU C++17 TESTS 13 15 0 800
159989376 NaveenKumar A June 9, 2022, 5:51 a.m. OK GNU C++17 TESTS 13 15 0 800
159988230 Himel_PUST A June 9, 2022, 5:30 a.m. OK GNU C++17 TESTS 13 15 0 800
159918164 for_preparation A June 8, 2022, 9:02 a.m. OK GNU C++17 (64) TESTS 13 0 0 800
159939074 Pigeon. A June 8, 2022, 12:57 p.m. OK GNU C++17 (64) TESTS 13 0 0 800
159948407 e3c8f1a924 A June 8, 2022, 2:46 p.m. OK GNU C++17 (64) TESTS 13 0 5222400 800
159989841 Abhichauhan A June 9, 2022, 5:59 a.m. OK GNU C++17 (64) TESTS 13 15 0 800
159989150 ankancool A June 9, 2022, 5:47 a.m. OK GNU C++17 (64) TESTS 13 15 0 800
159978986 Kicamon A June 9, 2022, 1:20 a.m. OK GNU C++17 (64) TESTS 13 15 0 800
159989893 suryam35 A June 9, 2022, 5:59 a.m. OK GNU C++17 (64) TESTS 13 15 0 800
159973811 RoWan_Hamada A June 8, 2022, 9:31 p.m. OK GNU C++17 (64) TESTS 13 15 0 800
159968776 Punisher_at_work A June 8, 2022, 7:27 p.m. OK GNU C++17 (64) TESTS 13 15 0 800
159974017 mrbrown A June 8, 2022, 9:38 p.m. OK GNU C++17 (64) TESTS 13 15 0 800
159961069 MNnazrul A June 8, 2022, 5:32 p.m. OK GNU C++20 (64) TESTS 13 0 0 800
159986289 silxi A June 9, 2022, 4:53 a.m. OK GNU C++20 (64) TESTS 13 0 0 800
159984004 Saikat_deb A June 9, 2022, 3:56 a.m. OK GNU C++20 (64) TESTS 13 0 0 800
159983343 HeshamHany A June 9, 2022, 3:38 a.m. OK GNU C++20 (64) TESTS 13 0 0 800
159982151 huomark1001 A June 9, 2022, 3:07 a.m. OK GNU C++20 (64) TESTS 13 0 0 800
159981367 Yirgacheffe A June 9, 2022, 2:43 a.m. OK GNU C++20 (64) TESTS 13 0 0 800
159974313 ahmedabdelaziz60 A June 8, 2022, 9:49 p.m. OK GNU C++20 (64) TESTS 13 0 0 800
159971356 akshatgupta1231 A June 8, 2022, 8:22 p.m. OK GNU C++20 (64) TESTS 13 0 0 800
159970908 Emperor_Nazer A June 8, 2022, 8:11 p.m. OK GNU C++20 (64) TESTS 13 0 0 800
159950369 achvanov A June 8, 2022, 3:13 p.m. OK GNU C++20 (64) TESTS 13 0 0 800
159983035 pepradere A June 9, 2022, 3:30 a.m. OK Go TESTS 13 46 102400 800
159967175 Hasker A June 8, 2022, 6:57 p.m. OK Haskell TESTS 13 31 0 800
159936824 the_unseen A June 8, 2022, 12:32 p.m. OK Java 11 TESTS 13 202 0 800
159909397 _alpaca A June 8, 2022, 7:08 a.m. OK Java 11 TESTS 13 202 0 800
159957255 SavageClown007 A June 8, 2022, 4:45 p.m. OK Java 11 TESTS 13 202 2560000 800
159909932 kingku_sahu A June 8, 2022, 7:14 a.m. OK Java 11 TESTS 13 218 0 800
159945652 Kdheeraj2002 A June 8, 2022, 2:11 p.m. OK Java 11 TESTS 13 218 102400 800
159987719 eshan18.09 A June 9, 2022, 5:21 a.m. OK Java 11 TESTS 13 233 0 800
159953032 vamshisamineni3 A June 8, 2022, 3:49 p.m. OK Java 11 TESTS 13 233 0 800
159948592 nawaz_habib A June 8, 2022, 2:49 p.m. OK Java 11 TESTS 13 233 0 800
159939772 poopoop A June 8, 2022, 1:05 p.m. OK Java 11 TESTS 13 233 0 800
159908609 ayush__1411 A June 8, 2022, 6:59 a.m. OK Java 11 TESTS 13 233 0 800
159940476 abhinavTalesra A June 8, 2022, 1:13 p.m. OK Java 8 TESTS 13 93 0 800
159920460 ahmedTarek28 A June 8, 2022, 9:26 a.m. OK Java 8 TESTS 13 93 7782400 800
159923330 Koka A June 8, 2022, 9:58 a.m. OK Java 8 TESTS 13 109 0 800
159917407 kocko A June 8, 2022, 8:54 a.m. OK Java 8 TESTS 13 109 0 800
159928192 moyan_01 A June 8, 2022, 10:56 a.m. OK Java 8 TESTS 13 124 0 800
159987041 aliansarifar A June 9, 2022, 5:09 a.m. OK Java 8 TESTS 13 140 0 800
159984811 rajivrtk12 A June 9, 2022, 4:17 a.m. OK Java 8 TESTS 13 140 0 800
159943746 nithin_bharathi A June 8, 2022, 1:50 p.m. OK Java 8 TESTS 13 140 0 800
159923845 PavneetSingh A June 8, 2022, 10:03 a.m. OK Java 8 TESTS 13 156 0 800
159920025 SainiAayush A June 8, 2022, 9:21 a.m. OK Java 8 TESTS 13 171 0 800
159982808 cafed00d A June 9, 2022, 3:24 a.m. OK JavaScript TESTS 13 46 1433600 800
159931823 nitish420 A June 8, 2022, 11:37 a.m. OK Kotlin 1.6 TESTS 13 311 0 800
159939138 Pigeon. A June 8, 2022, 12:58 p.m. OK MS C++ 2017 TESTS 13 31 0 800
159943606 eternalblue2906 A June 8, 2022, 1:49 p.m. OK MS C++ 2017 TESTS 13 31 204800 800
159933088 M.N.W A June 8, 2022, 11:50 a.m. OK MS C++ 2017 TESTS 13 46 0 800
159925028 Areas A June 8, 2022, 10:18 a.m. OK MS C++ 2017 TESTS 13 61 0 800
159989114 pk_9336 A June 9, 2022, 5:46 a.m. OK MS C++ 2017 TESTS 13 62 0 800
159911145 Akhiroy A June 8, 2022, 7:28 a.m. OK MS C++ 2017 TESTS 13 62 0 800
159935982 Morozko A June 8, 2022, 12:23 p.m. OK Node.js TESTS 13 171 4198400 800
159984935 cafed00d A June 9, 2022, 4:21 a.m. OK Ocaml TESTS 13 31 0 800
159949425 mayakin A June 8, 2022, 3:01 p.m. OK PHP TESTS 13 62 0 800
159920113 Apoorv_Rathore A June 8, 2022, 9:22 a.m. OK PyPy 3 TESTS 13 140 5836800 800
159943314 Chiho A June 8, 2022, 1:45 p.m. OK PyPy 3 TESTS 13 140 6553600 800
159910634 xuhao95 A June 8, 2022, 7:22 a.m. OK PyPy 3 TESTS 13 155 5120000 800
159932761 tcltk A June 8, 2022, 11:47 a.m. OK PyPy 3 TESTS 13 171 6963200 800
159988427 sreenija_07 A June 9, 2022, 5:34 a.m. OK PyPy 3 TESTS 13 264 7168000 800
159937201 Sir_Ahmed_Imran A June 8, 2022, 12:36 p.m. OK PyPy 3 TESTS 13 264 7475200 800
159938163 Flanture A June 8, 2022, 12:47 p.m. OK PyPy 3 TESTS 13 264 7680000 800
159970889 Utkarsh_9 A June 8, 2022, 8:10 p.m. OK PyPy 3 TESTS 13 265 6246400 800
159906364 Tanish08 A June 8, 2022, 6:35 a.m. OK PyPy 3 TESTS 13 280 5939200 800
159959159 ShrijitShaswat A June 8, 2022, 5:09 p.m. OK PyPy 3 TESTS 13 280 6860800 800
159963606 samchen123 A June 8, 2022, 6:06 p.m. OK PyPy 3-64 TESTS 13 93 7168000 800
159981170 MistaAsh A June 9, 2022, 2:37 a.m. OK PyPy 3-64 TESTS 13 93 9420800 800
159906780 mayank35 A June 8, 2022, 6:39 a.m. OK PyPy 3-64 TESTS 13 108 7270400 800
159944455 crapcode A June 8, 2022, 1:58 p.m. OK PyPy 3-64 TESTS 13 109 10342400 800
159922941 abhijeet.panihar.cse20 A June 8, 2022, 9:53 a.m. OK PyPy 3-64 TESTS 13 124 8908800 800
159934909 staycurious A June 8, 2022, 12:10 p.m. OK PyPy 3-64 TESTS 13 124 9523200 800
159974488 pirate0 A June 8, 2022, 9:55 p.m. OK PyPy 3-64 TESTS 13 124 9728000 800
159959323 feelme A June 8, 2022, 5:11 p.m. OK PyPy 3-64 TESTS 13 124 10444800 800
159904892 hardik2001 A June 8, 2022, 6:17 a.m. OK PyPy 3-64 TESTS 13 186 9932800 800
159968390 Shivamk21 A June 8, 2022, 7:19 p.m. OK PyPy 3-64 TESTS 13 187 10752000 800
159934746 bbfish A June 8, 2022, 12:08 p.m. OK Python 3 TESTS 13 46 0 800
159980299 theoracal A June 9, 2022, 2:07 a.m. OK Python 3 TESTS 13 46 204800 800
159946101 abel_abate A June 8, 2022, 2:16 p.m. OK Python 3 TESTS 13 77 0 800
159939617 dbit A June 8, 2022, 1:04 p.m. OK Python 3 TESTS 13 77 0 800
159929456 piSquared A June 8, 2022, 11:10 a.m. OK Python 3 TESTS 13 77 307200 800
159925166 sixthcore A June 8, 2022, 10:19 a.m. OK Python 3 TESTS 13 77 307200 800
159934452 HelloWorld2002 A June 8, 2022, 12:05 p.m. OK Python 3 TESTS 13 93 409600 800
159925924 LGDDK A June 8, 2022, 10:29 a.m. OK Python 3 TESTS 13 93 409600 800
159979350 theoracal A June 9, 2022, 1:32 a.m. OK Python 3 TESTS 13 108 0 800
159948453 dumngeon A June 8, 2022, 2:47 p.m. OK Python 3 TESTS 13 108 0 800
159981737 cafed00d A June 9, 2022, 2:55 a.m. OK Ruby 3 TESTS 13 233 204800 800
159937298 MoSooN A June 8, 2022, 12:37 p.m. OK Rust 2021 TESTS 13 77 0 800
159936708 csapra.schucan A June 8, 2022, 12:31 p.m. OK Rust 2021 TESTS 13 78 0 800

remove filters

Back to search problems