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 |
|---|---|---|---|---|---|---|
| 993 | Codeforces Round 488 by NEAR (Div. 1) | FINISHED | False | 9000 | 247238723 | June 16, 2018, 4:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 832 ) | D | Compute Power | PROGRAMMING | binary search dp greedy | 2400 |
You need to execute several tasks, each associated with number of processors it needs, and the compute power it will consume. You have sufficient number of analog computers, each with enough processors for any task. Each computer can execute up to one task at a time, and no more than two tasks total. The first task can be any, the second task on each computer must use strictly less power than the first. You will assign between 1 and 2 tasks to each computer. You will then first execute the first task on each computer, wait for all of them to complete, and then execute the second task on each computer that has two tasks assigned. If the average compute power per utilized processor (the sum of all consumed powers for all tasks presently running divided by the number of utilized processors) across all computers exceeds some unknown threshold during the execution of the first tasks, the entire system will blow up. There is no restriction on the second tasks execution. Find the lowest threshold for which it is possible. Due to the specifics of the task, you need to print the answer multiplied by 1000 and rounded up. The first line contains a single integer n ( 1 ≤ n ≤ 50 ) — the number of tasks. The second line contains n integers a 1 , a 2 , ..., a n ( 1 ≤ a i ≤ 10 8 ), where a i represents the amount of power required for the i -th task. The third line contains n integers b 1 , b 2 , ..., b n ( 1 ≤ b i ≤ 100 ), where b i is the number of processors that i -th task will utilize. Print a single integer value — the lowest threshold for which it is possible to assign all tasks in such a way that the system will not blow up after the first round of computation, multiplied by 1000 and rounded up. In the first example the best strategy is to run each task on a separate computer, getting average compute per processor during the first round equal to 9. In the second task it is best to run tasks with compute 10 and 9 on one computer, tasks with compute 10 and 8 on anot |
| Codeforces Round #488 editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 69423074 | hos.lyric | D | Jan. 23, 2020, 2:59 p.m. | OK | D | TESTS | 36 | 31 | 0 | 2400 | |
| 39338844 | NaVi_Awson | D | June 17, 2018, 3:21 p.m. | OK | GNU C++ | TESTS | 36 | 15 | 0 | 2400 | |
| 39883048 | ILLENIUM | D | July 3, 2018, 3:56 a.m. | OK | GNU C++ | TESTS | 36 | 30 | 0 | 2400 | |
| 39641694 | FarmerJohn | D | June 25, 2018, 7:28 a.m. | OK | GNU C++ | TESTS | 36 | 30 | 0 | 2400 | |
| 40083404 | litble | D | July 8, 2018, 11:22 a.m. | OK | GNU C++ | TESTS | 36 | 31 | 0 | 2400 | |
| 40049548 | luogu_bot3 | D | July 7, 2018, 3:09 a.m. | OK | GNU C++ | TESTS | 36 | 31 | 0 | 2400 | |
| 39640465 | ZhongJQ | D | June 25, 2018, 6:38 a.m. | OK | GNU C++ | TESTS | 36 | 31 | 0 | 2400 | |
| 39640402 | jokerwyt | D | June 25, 2018, 6:36 a.m. | OK | GNU C++ | TESTS | 36 | 31 | 0 | 2400 | |
| 39347248 | Sampson | D | June 18, 2018, 5:03 a.m. | OK | GNU C++ | TESTS | 36 | 31 | 0 | 2400 | |
| 42428265 | dasxxx | D | Sept. 3, 2018, 1:41 p.m. | OK | GNU C++ | TESTS | 36 | 31 | 102400 | 2400 | |
| 39311258 | DPR-pavlin | D | June 16, 2018, 6:28 p.m. | OK | GNU C++ | TESTS | 36 | 31 | 102400 | 2400 | |
| 39693019 | SheepRanger | D | June 27, 2018, 6:38 a.m. | OK | GNU C++11 | TESTS | 36 | 15 | 0 | 2400 | |
| 39328097 | zyding | D | June 17, 2018, 7:33 a.m. | OK | GNU C++11 | TESTS | 36 | 15 | 0 | 2400 | |
| 39321090 | Dream-Reality | D | June 16, 2018, 11:39 p.m. | OK | GNU C++11 | TESTS | 36 | 15 | 0 | 2400 | |
| 39307123 | krijgertje | D | June 16, 2018, 5:58 p.m. | OK | GNU C++11 | TESTS | 36 | 15 | 0 | 2400 | |
| 39423863 | Nson | D | June 20, 2018, 12:29 a.m. | OK | GNU C++11 | TESTS | 36 | 15 | 102400 | 2400 | |
| 39318658 | BSBandme | D | June 16, 2018, 8:52 p.m. | OK | GNU C++11 | TESTS | 36 | 15 | 102400 | 2400 | |
| 39675074 | AlexLuchianov | D | June 26, 2018, 12:16 p.m. | OK | GNU C++11 | TESTS | 36 | 30 | 0 | 2400 | |
| 39509402 | flatline | D | June 22, 2018, 8:05 a.m. | OK | GNU C++11 | TESTS | 36 | 30 | 0 | 2400 | |
| 39463601 | samuelfgs | D | June 21, 2018, 1:31 p.m. | OK | GNU C++11 | TESTS | 36 | 30 | 0 | 2400 | |
| 39323207 | rxdoi | D | June 17, 2018, 2:49 a.m. | OK | GNU C++11 | TESTS | 36 | 30 | 0 | 2400 | |
| 39394700 | FallDream | D | June 19, 2018, 12:37 a.m. | OK | GNU C++14 | TESTS | 36 | 15 | 0 | 2400 | |
| 39309208 | Endagorion | D | June 16, 2018, 6:12 p.m. | OK | GNU C++14 | TESTS | 36 | 15 | 0 | 2400 | |
| 39315982 | wakaka | D | June 16, 2018, 7:02 p.m. | OK | GNU C++14 | TESTS | 36 | 15 | 102400 | 2400 | |
| 48485104 | RobeZH | D | Jan. 17, 2019, 8:01 a.m. | OK | GNU C++14 | TESTS | 36 | 15 | 204800 | 2400 | |
| 39310148 | mjhun | D | June 16, 2018, 6:19 p.m. | OK | GNU C++14 | TESTS | 36 | 15 | 204800 | 2400 | |
| 39340801 | bibibi | D | June 17, 2018, 5:30 p.m. | OK | GNU C++14 | TESTS | 36 | 15 | 1331200 | 2400 | |
| 42350384 | wilson.ho | D | Sept. 2, 2018, 4:34 a.m. | OK | GNU C++14 | TESTS | 36 | 30 | 0 | 2400 | |
| 39345213 | Never_See | D | June 18, 2018, 12:59 a.m. | OK | GNU C++14 | TESTS | 36 | 30 | 0 | 2400 | |
| 39322674 | tmwilliamlin168 | D | June 17, 2018, 2:09 a.m. | OK | GNU C++14 | TESTS | 36 | 30 | 0 | 2400 | |
| 39315449 | Toxel | D | June 16, 2018, 6:58 p.m. | OK | GNU C++14 | TESTS | 36 | 30 | 0 | 2400 | |
| 39358774 | andrey.zavarin | D | June 18, 2018, 2:47 p.m. | OK | GNU C++17 | TESTS | 36 | 15 | 0 | 2400 | |
| 39319009 | Kerim.K | D | June 16, 2018, 9:06 p.m. | OK | GNU C++17 | TESTS | 36 | 15 | 204800 | 2400 | |
| 39317286 | kefaa2 | D | June 16, 2018, 8:24 p.m. | OK | GNU C++17 | TESTS | 36 | 15 | 307200 | 2400 | |
| 39306272 | Errichto | D | June 16, 2018, 5:52 p.m. | OK | GNU C++17 | TESTS | 36 | 30 | 0 | 2400 | |
| 39302795 | V--o_o--V | D | June 16, 2018, 5:29 p.m. | OK | GNU C++17 | TESTS | 36 | 30 | 204800 | 2400 | |
| 39314961 | Noam527 | D | June 16, 2018, 6:55 p.m. | OK | GNU C++17 | TESTS | 36 | 30 | 307200 | 2400 | |
| 45032660 | cephian | D | Oct. 29, 2018, 5:30 a.m. | OK | GNU C++17 | TESTS | 36 | 30 | 409600 | 2400 | |
| 69877943 | CarrieM7 | D | Jan. 31, 2020, 5:05 a.m. | OK | GNU C++17 | TESTS | 36 | 31 | 0 | 2400 | |
| 51848405 | NewClno1 | D | March 26, 2019, 6:24 a.m. | OK | GNU C++17 | TESTS | 36 | 31 | 0 | 2400 | |
| 39818493 | zbtrs | D | July 1, 2018, 10:24 a.m. | OK | GNU C++17 | TESTS | 36 | 31 | 0 | 2400 | |
| 39428508 | Asgar | D | June 20, 2018, 7:17 a.m. | OK | Java 8 | TESTS | 36 | 124 | 0 | 2400 | |
| 39309115 | qwerty787788 | D | June 16, 2018, 6:12 p.m. | OK | Java 8 | TESTS | 36 | 156 | 0 | 2400 | |
| 39307231 | uwi | D | June 16, 2018, 5:58 p.m. | OK | Java 8 | TESTS | 36 | 218 | 0 | 2400 | |
| 41668827 | rahejamehul | D | Aug. 17, 2018, 2:48 a.m. | OK | Java 8 | TESTS | 36 | 264 | 4710400 | 2400 | |
| 39319775 | elizarov | D | June 16, 2018, 9:46 p.m. | OK | Kotlin | TESTS | 36 | 171 | 716800 | 2400 | |
| 39319759 | elizarov | D | June 16, 2018, 9:45 p.m. | OK | Kotlin | TESTS | 36 | 187 | 716800 | 2400 | |
| 39412931 | xh286286 | D | June 19, 2018, 1:52 p.m. | OK | Python 3 | TESTS | 36 | 156 | 716800 | 2400 | |
| 39542496 | LemonTree | D | June 23, 2018, 1:22 p.m. | OK | Rust | TESTS | 36 | 31 | 102400 | 2400 |
Back to search problems