Codeforces Round 616 (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
1290 Codeforces Round 616 (Div. 1) FINISHED False 9000 156700511 Feb. 2, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 855 ) D Coffee Varieties (hard version) PROGRAMMING constructive algorithms graphs interactive 2900

B"This is the hard version of the problem. You can find the easy version in the Div. 2 contest. Both versions only differ in the number of times you can ask your friend to taste coffee. This is an interactive problem. You're considering moving to another city, where one of your friends already lives. There are n caf xc3 xa9s in this city, where n is a power of two. The i -th caf xc3 xa9 produces a single variety of coffee a_i . As you're a coffee-lover, before deciding to move or not, you want to know the number d of distinct varieties of coffees produced in this city. You don't know the values a_1, ldots, a_n . Fortunately, your friend has a memory of size k , where k is a power of two. Once per day, you can ask him to taste a cup of coffee produced by the caf xc3 xa9 c , and he will tell you if he tasted a similar coffee during the last k days. You can also ask him to take a medication that will reset his memory. He will forget all previous cups of coffee tasted. You can reset his memory at most 30 000 times. More formally, the memory of your friend is a queue S . Doing a query on caf xc3 xa9 c will: Doing a reset request will pop all elements out of S . Your friend can taste at most dfrac{3n^2}{2k} cups of coffee in total. Find the diversity d (number of distinct values in the array a ). Note that asking your friend to reset his memory does not count towards the number of times you ask your friend to taste a cup of coffee. In some test cases the behavior of the interactor is adaptive. It means that the array a may be not fixed before the start of the interaction and may depend on your queries. It is guaranteed that at any moment of the interaction, there is at least one array a consistent with all the answers given so far. The first line contains two integers n and k ( 1 <= k <= n <= 1024 , k and n are powers of two). It is guaranteed that"...

Tutorials

Codeforces Round #616 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
70560477 anpans D Feb. 8, 2020, 11:43 a.m. OK Clang++17 Diagnostics TESTS 79 311 0 2900
70599237 HN-001 D Feb. 9, 2020, 3:23 a.m. OK GNU C++11 TESTS 79 46 0 2900
70168004 Gioto D Feb. 3, 2020, 4:50 p.m. OK GNU C++11 TESTS 79 46 0 2900
70106526 Frame233 D Feb. 3, 2020, 3:30 a.m. OK GNU C++11 TESTS 79 46 0 2900
70157314 YangDavid D Feb. 3, 2020, 2:22 p.m. OK GNU C++11 TESTS 79 61 0 2900
70715361 cookiedoth D Feb. 10, 2020, 8:21 a.m. OK GNU C++11 TESTS 79 62 0 2900
70595497 pspencil D Feb. 8, 2020, 11:30 p.m. OK GNU C++11 TESTS 79 62 0 2900
70564015 LJC00118 D Feb. 8, 2020, 12:42 p.m. OK GNU C++11 TESTS 79 62 0 2900
70366936 dysyn1314 D Feb. 5, 2020, 2:22 p.m. OK GNU C++11 TESTS 79 62 0 2900
70230943 Pigbrain D Feb. 4, 2020, 12:27 p.m. OK GNU C++11 TESTS 79 62 0 2900
70159462 lonely_wind_ D Feb. 3, 2020, 2:51 p.m. OK GNU C++11 TESTS 79 62 0 2900
70106737 tmwilliamlin168 D Feb. 3, 2020, 3:36 a.m. OK GNU C++14 TESTS 79 62 0 2900
71068896 Jian_Ron D Feb. 14, 2020, 3:21 p.m. OK GNU C++14 TESTS 79 77 0 2900
70455936 kmjp D Feb. 6, 2020, 5:28 p.m. OK GNU C++14 TESTS 79 77 0 2900
70188170 xpov1LL D Feb. 3, 2020, 11:43 p.m. OK GNU C++14 TESTS 79 77 0 2900
70104044 Crazy_Diamond D Feb. 3, 2020, 1:59 a.m. OK GNU C++14 TESTS 79 92 204800 2900
70089907 nikolapesic2802 D Feb. 2, 2020, 6:02 p.m. OK GNU C++14 TESTS 79 92 204800 2900
70492049 achibulup D Feb. 7, 2020, 9:20 a.m. OK GNU C++14 TESTS 79 93 0 2900
70331955 dog_yang D Feb. 5, 2020, 6:13 a.m. OK GNU C++14 TESTS 79 93 0 2900
70161330 yhx-12243 D Feb. 3, 2020, 3:19 p.m. OK GNU C++14 TESTS 79 93 0 2900
70100628 Motarack D Feb. 2, 2020, 11:02 p.m. OK GNU C++14 TESTS 79 93 102400 2900
70412310 jjikkollp D Feb. 6, 2020, 5:49 a.m. OK GNU C++17 TESTS 79 62 0 2900
70739287 hjk1030 D Feb. 10, 2020, 3:31 p.m. OK GNU C++17 TESTS 79 77 0 2900
70682095 krijgertje D Feb. 9, 2020, 5:15 p.m. OK GNU C++17 TESTS 79 77 0 2900
70612188 ShadowLight D Feb. 9, 2020, 8:48 a.m. OK GNU C++17 TESTS 79 77 0 2900
70579247 summitwei D Feb. 8, 2020, 4:42 p.m. OK GNU C++17 TESTS 79 77 0 2900
70357331 jhdonghj112 D Feb. 5, 2020, 12:32 p.m. OK GNU C++17 TESTS 79 77 0 2900
70121425 HNO2 D Feb. 3, 2020, 8:48 a.m. OK GNU C++17 TESTS 79 77 0 2900
70728998 Tiramister D Feb. 10, 2020, 12:45 p.m. OK GNU C++17 TESTS 79 77 102400 2900
71095607 gongsuidashen D Feb. 15, 2020, 4:44 a.m. OK GNU C++17 TESTS 79 77 204800 2900
70228527 chenkuowen D Feb. 4, 2020, 11:47 a.m. OK GNU C++17 TESTS 79 77 204800 2900
70080667 qwerty787788 D Feb. 2, 2020, 4:19 p.m. OK Java 11 TESTS 79 701 0 2900
70132789 math957963 D Feb. 3, 2020, 10:53 a.m. OK MS C++ TESTS 79 155 0 2900
70449719 pajenegod D Feb. 6, 2020, 4:06 p.m. OK PyPy 2 TESTS 79 514 8089600 2900

remove filters

Back to search problems