Codeforces Round 363 (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
698 Codeforces Round 363 (Div. 1) FINISHED False 8100 262889699 July 19, 2016, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1330 ) C LRU PROGRAMMING bitmasks dp math probabilities 2700

B"While creating high loaded systems one should pay a special attention to caching. This problem will be about one of the most popular caching algorithms called LRU (Least Recently Used). Suppose the cache may store no more than k objects. At the beginning of the workflow the cache is empty. When some object is queried we check if it is present in the cache and move it here if it's not. If there are more than k objects in the cache after this, the least recently used one should be removed. In other words, we remove the object that has the smallest time of the last query. Consider there are n videos being stored on the server, all of the same size. Cache can store no more than k videos and caching algorithm described above is applied. We know that any time a user enters the server he pick the video i with probability pi. The choice of the video is independent to any events before. The goal of this problem is to count for each of the videos the probability it will be present in the cache after 10100 queries. The first line of the input contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8920) -- the number of videos and the size of the cache respectively. Next line contains n real numbers pi (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891), each of them is given with no more than two digits after decimal point. It's guaranteed that the sum of all pi is equal to 1. Print n real numbers, the i-th of them should be equal to the probability that the i-th video will be present in the cache after 10100 queries. You answer will be considered correct if its absolute or relative error does not exceed 10 xe2 x80 x89- xe2 x80 x896. Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if . "...

Tutorials

Solution

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
19363820 ez_ljh C July 23, 2016, 11:31 a.m. OK FPC TESTS 66 327 25190400 2700
23639522 bzh C Jan. 8, 2017, 3:56 a.m. OK FPC TESTS 66 1684 213094400 2700
19260505 Chipe1 C July 19, 2016, 6:30 p.m. OK GNU C TESTS 66 265 102502400 2700
23579709 vjudge2 C Jan. 6, 2017, 9:38 a.m. OK GNU C++ TESTS 66 62 14540800 2700
20810309 BlankVerse C Sept. 22, 2016, 5:06 a.m. OK GNU C++ TESTS 66 77 8396800 2700
19412866 imathi C July 26, 2016, 2:05 a.m. OK GNU C++ TESTS 66 77 21094400 2700
19462900 yeziqing10 C July 28, 2016, 2:07 p.m. OK GNU C++ TESTS 66 78 8396800 2700
23734016 vjudge5 C Jan. 12, 2017, 9:08 a.m. OK GNU C++ TESTS 66 78 18944000 2700
23733897 qwsin C Jan. 12, 2017, 8:59 a.m. OK GNU C++ TESTS 66 78 18944000 2700
19265830 PresentationError C July 20, 2016, 1:30 a.m. OK GNU C++ TESTS 66 78 50483200 2700
23732735 Continue C Jan. 12, 2017, 7:32 a.m. OK GNU C++ TESTS 66 93 10444800 2700
21224044 returnzoo C Oct. 6, 2016, 1:30 a.m. OK GNU C++ TESTS 66 93 12390400 2700
19608646 yuxiaogang C Aug. 4, 2016, 3:50 a.m. OK GNU C++ TESTS 66 93 12595200 2700
50603340 maxtir C Feb. 28, 2019, 1:35 p.m. OK GNU C++11 TESTS 66 62 12595200 2700
19268832 immortalCO C July 20, 2016, 4:25 a.m. OK GNU C++11 TESTS 66 62 12595200 2700
19254633 sfiction C July 19, 2016, 3:09 p.m. OK GNU C++11 TESTS 66 62 12595200 2700
50992699 luogu_bot2 C March 8, 2019, 12:26 a.m. OK GNU C++11 TESTS 66 62 16793600 2700
50992687 shuidi C March 8, 2019, 12:25 a.m. OK GNU C++11 TESTS 66 62 16793600 2700
35912770 ZJ75211 C March 4, 2018, 8:24 a.m. OK GNU C++11 TESTS 66 62 23040000 2700
19263512 Golovanov399 C July 19, 2016, 9:53 p.m. OK GNU C++11 TESTS 66 62 29388800 2700
19278573 McGinn C July 20, 2016, 11:12 a.m. OK GNU C++11 TESTS 66 77 8396800 2700
19311974 KrK C July 22, 2016, 2:42 a.m. OK GNU C++11 TESTS 66 77 12595200 2700
45798043 Winniechen C Nov. 16, 2018, 11:54 a.m. OK GNU C++11 TESTS 66 77 20992000 2700
28018966 Amayoneko C June 25, 2017, 9:09 a.m. OK GNU C++14 TESTS 66 62 18739200 2700
27751089 Tooc0ld C June 13, 2017, 7:44 a.m. OK GNU C++14 TESTS 66 78 16793600 2700
50880285 huyufeifei C March 6, 2019, 8:37 a.m. OK GNU C++14 TESTS 66 78 28876800 2700
31145236 danya.smelskiy C Oct. 8, 2017, 1:23 p.m. OK GNU C++14 TESTS 66 108 12800000 2700
29965386 andwho C Sept. 1, 2017, 6:29 a.m. OK GNU C++14 TESTS 66 109 25190400 2700
60246780 ae04071 C Sept. 8, 2019, 3:28 a.m. OK GNU C++14 TESTS 66 124 8396800 2700
29868014 jufusong C Aug. 29, 2017, 2:14 p.m. OK GNU C++14 TESTS 66 124 8601600 2700
34627275 Namnamseo C Jan. 28, 2018, 8:14 a.m. OK GNU C++14 TESTS 66 124 10342400 2700
23661604 Hujiwara C Jan. 9, 2017, 7:21 a.m. OK GNU C++14 TESTS 66 124 10342400 2700
38822374 Aeon C June 1, 2018, 8:30 a.m. OK GNU C++14 TESTS 66 124 11878400 2700
68297532 twangal C Jan. 6, 2020, 4:09 a.m. OK GNU C++17 TESTS 66 108 25190400 2700
63918277 Roundgod C Oct. 31, 2019, 10:51 a.m. OK GNU C++17 TESTS 66 124 8396800 2700
64750127 vjudge4 C Nov. 12, 2019, 2:56 p.m. OK GNU C++17 TESTS 66 124 15974400 2700
39699309 zoomswk C June 27, 2018, 11:06 a.m. OK GNU C++17 TESTS 66 140 0 2700
58178726 AgustinM C Aug. 2, 2019, 2:13 p.m. OK GNU C++17 TESTS 66 140 8499200 2700
68444888 ppavic C Jan. 9, 2020, 12:18 p.m. OK GNU C++17 TESTS 66 140 27648000 2700
58178737 AgustinM C Aug. 2, 2019, 2:14 p.m. OK GNU C++17 TESTS 66 155 8499200 2700
58083974 AgustinM C July 31, 2019, 2:51 p.m. OK GNU C++17 TESTS 66 155 8499200 2700
44987268 PedyD C Oct. 28, 2018, 11:03 a.m. OK GNU C++17 TESTS 66 155 17203200 2700
39358828 Smaug C June 18, 2018, 2:49 p.m. OK GNU C++17 TESTS 66 156 12800000 2700
19473162 lehar C July 29, 2016, 5:54 a.m. OK Java 7 TESTS 66 389 7577600 2700
19257282 threepipes_s C July 19, 2016, 4:58 p.m. OK Java 8 TESTS 66 264 6451200 2700
19288302 pallavi C July 20, 2016, 8:58 p.m. OK Java 8 TESTS 66 264 16486400 2700
27310824 V--o_o--V C May 23, 2017, 9:07 p.m. OK Java 8 TESTS 66 265 6758400 2700
19237292 Petr C July 19, 2016, 1:28 p.m. OK Java 8 TESTS 66 280 6758400 2700
19671889 kafy83 C Aug. 6, 2016, 2:42 p.m. OK Java 8 TESTS 66 280 28672000 2700
20030074 AresEyE C Aug. 21, 2016, 3:44 p.m. OK Java 8 TESTS 66 295 28774400 2700
19252778 mmaxio C July 19, 2016, 2:56 p.m. OK Java 8 TESTS 66 296 6348800 2700
19280423 hama-du C July 20, 2016, 12:39 p.m. OK Java 8 TESTS 66 296 6758400 2700
19249709 VArtem C July 19, 2016, 2:34 p.m. OK Java 8 TESTS 66 311 6246400 2700
19671676 kafy83 C Aug. 6, 2016, 2:29 p.m. OK Java 8 TESTS 66 311 29286400 2700
26318953 Los_Angelos_Laycurse C April 12, 2017, 1:50 p.m. OK MS C++ TESTS 66 124 14745600 2700
19664471 hwizard C Aug. 6, 2016, 7:15 a.m. OK MS C++ TESTS 66 155 18841600 2700
19262925 Filyan C July 19, 2016, 9:02 p.m. OK MS C++ TESTS 66 171 8396800 2700
19908645 asdfadfavzxc C Aug. 16, 2016, 1:50 p.m. OK MS C++ TESTS 66 171 14643200 2700
19446285 TonySnark C July 27, 2016, 5:27 p.m. OK MS C++ TESTS 66 202 8396800 2700
20358462 Awa149 C Sept. 3, 2016, 10:22 a.m. OK MS C++ TESTS 66 217 8396800 2700
19274296 DimonK C July 20, 2016, 8:04 a.m. OK MS C++ TESTS 66 249 8396800 2700
19235095 DEGwer C July 19, 2016, 1:19 p.m. OK MS C++ TESTS 66 670 8396800 2700
19439115 NotImplemented C July 27, 2016, 10:12 a.m. OK MS C++ TESTS 66 795 22835200 2700
52134555 Darooha C April 1, 2019, 12:54 a.m. OK Ocaml TESTS 66 452 15360000 2700

remove filters

Back to search problems