Codeforces Round 829 (Div. 1)

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
1753 Codeforces Round 829 (Div. 1) FINISHED False 7200 65311799 Oct. 23, 2022, 7:50 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 333 ) E N Machines PROGRAMMING binary search brute force greedy 3300

B'You have been invited as a production process optimization specialist to some very large company. The company has n machines at its factory, standing one behind another in the production chain. Each machine can be described in one of the following two ways: (+,~a_i) or (*,~a_i) . If a workpiece with the value x is supplied to the machine of kind (+,~a_i) , then the output workpiece has value x + a_i . If a workpiece with the value x is supplied to the machine of kind (*,~a_i) , then the output workpiece has value x cdot a_i . The whole production process is as follows. The workpiece with the value 1 is supplied to the first machine, then the workpiece obtained after the operation of the first machine is supplied to the second machine, then the workpiece obtained after the operation of the second machine is supplied to the third machine, and so on. The company is not doing very well, so now the value of the resulting product does not exceed 2 cdot 10^9 . The directors of the company are not satisfied with the efficiency of the production process and have given you a budget of b coins to optimize it. To optimize production you can change the order of machines in the chain. Namely, by spending p coins, you can take any machine of kind (+,~a_i) and move it to any place in the chain without changing the order of other machines. Also, by spending m coins, you can take any machine of kind (*,~a_i) and move it to any place in the chain. What is the maximum value of the resulting product that can be achieved if the total cost of movements that are made should not exceed b coins? The first line contains four integers n , b , p and m ( 1 <= n <= 10^6 , 1 <= b, p, m <= 10^9 ) -- the number of machine at the factory, your budget and costs of movements of both kinds of machines. Each of the following n lines contains description of'...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
177677251 Potassium E Oct. 23, 2022, 5:10 p.m. OK GNU C++14 TESTS 30 327 21913600 3300
177704858 Alex_Wei E Oct. 24, 2022, 12:09 a.m. OK GNU C++14 TESTS 30 327 28876800 3300
177595330 zhouziheng E Oct. 23, 2022, 9:27 a.m. OK GNU C++14 TESTS 30 343 21504000 3300
177702558 liympanda E Oct. 23, 2022, 10:53 p.m. OK GNU C++14 TESTS 30 358 14540800 3300
177646839 Alex_Wei E Oct. 23, 2022, 1:06 p.m. OK GNU C++14 TESTS 30 358 28876800 3300
177719533 Crying E Oct. 24, 2022, 5:10 a.m. OK GNU C++14 TESTS 30 374 28569600 3300
177601527 hhhyyyfff E Oct. 23, 2022, 9:42 a.m. OK GNU C++14 TESTS 30 390 15974400 3300
177649427 DataStructures E Oct. 23, 2022, 1:31 p.m. OK GNU C++14 TESTS 30 405 36659200 3300
177672621 yuto1115 E Oct. 23, 2022, 4:26 p.m. OK GNU C++17 TESTS 30 296 11059200 3300
177668274 ugly2333 E Oct. 23, 2022, 3:48 p.m. OK GNU C++17 TESTS 30 327 25804800 3300
177589285 Radewoosh E Oct. 23, 2022, 9:12 a.m. OK GNU C++17 TESTS 30 358 105267200 3300
177671872 QAQAutoMaton E Oct. 23, 2022, 4:19 p.m. OK GNU C++17 (64) TESTS 30 77 63078400 3300
177670877 hos.lyric E Oct. 23, 2022, 4:11 p.m. OK GNU C++17 (64) TESTS 30 93 14745600 3300
177711264 lqx2005 E Oct. 24, 2022, 2:42 a.m. OK GNU C++17 (64) TESTS 30 187 30003200 3300
177722472 CrTsIr E Oct. 24, 2022, 5:54 a.m. OK GNU C++17 (64) TESTS 30 202 15155200 3300
177674601 tabr E Oct. 23, 2022, 4:44 p.m. OK GNU C++17 (64) TESTS 30 202 33587200 3300
177652585 zihouzhong E Oct. 23, 2022, 1:49 p.m. OK GNU C++17 (64) TESTS 30 218 29388800 3300
177593827 LJC00118 E Oct. 23, 2022, 9:23 a.m. OK GNU C++17 (64) TESTS 30 218 32665600 3300
177601321 Nyaan E Oct. 23, 2022, 9:42 a.m. OK GNU C++17 (64) TESTS 30 218 40243200 3300
177673253 noimi E Oct. 23, 2022, 4:32 p.m. OK GNU C++17 (64) TESTS 30 233 42393600 3300
177674699 tabr E Oct. 23, 2022, 4:45 p.m. OK GNU C++17 (64) TESTS 30 234 58368000 3300
177581778 jiangly E Oct. 23, 2022, 8:56 a.m. OK GNU C++20 (64) TESTS 30 155 15974400 3300
177649362 BurnedChicken E Oct. 23, 2022, 1:30 p.m. OK GNU C++20 (64) TESTS 30 155 22220800 3300
177651714 taa1 E Oct. 23, 2022, 1:44 p.m. OK GNU C++20 (64) TESTS 30 156 15974400 3300
177659558 flukehn E Oct. 23, 2022, 2:39 p.m. OK GNU C++20 (64) TESTS 30 156 24985600 3300
177686086 natofp E Oct. 23, 2022, 6:38 p.m. OK GNU C++20 (64) TESTS 30 156 31744000 3300
177666958 brunovsky E Oct. 23, 2022, 3:37 p.m. OK GNU C++20 (64) TESTS 30 171 7475200 3300
177666559 brunovsky E Oct. 23, 2022, 3:34 p.m. OK GNU C++20 (64) TESTS 30 171 7475200 3300
177656682 syl123456 E Oct. 23, 2022, 2:17 p.m. OK GNU C++20 (64) TESTS 30 171 11468800 3300
177665938 BurnedChicken E Oct. 23, 2022, 3:29 p.m. OK GNU C++20 (64) TESTS 30 171 22220800 3300
177690180 thematdev E Oct. 23, 2022, 7 p.m. OK GNU C++20 (64) TESTS 30 171 25600000 3300
177601068 conqueror_of_tourist E Oct. 23, 2022, 9:41 a.m. OK PyPy 3-64 TESTS 30 623 51712000 3300

remove filters

Back to search problems