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 |
---|---|---|---|---|---|---|
1696 | Codeforces Global Round 21 | FINISHED | False | 8100 | 75655499 | June 25, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 164 ) | H | Maximum Product? | PROGRAMMING | brute force combinatorics dp greedy math two pointers |
B'You are given a positive integer k . For a multiset of integers S , define f(S) as the following. More formally, let |S| denote the number of elements in S . Then, You are given a multiset of integers, A . Compute sum limits_{B subseteq A} f(B) modulo 10^9+7 . Note that in this problem, we distinguish the elements by indices instead of values. That is, a multiset consisting of n elements always has 2^n distinct subsets regardless of whether some of its elements are equal. The first line of input contains two integers n and k , where n is the number of elements in A ( 1 <= k <= n <= 600 ). The second line of input contains n integers a_1,a_2, ... ,a_n , describing the elements in A ( -10^9 <= a_i <= 10^9 ). Output sum limits_{B subseteq A} f(B) modulo 10^9+7 . Consider the first sample. From the definitions we know that So we should print (0+0+0+0-2-4+8+8) bmod (10^9+7)=10 . In the second example, note that although the multiset consists of three same values, it still has 8 distinct subsets: varnothing, {1 }, {1 }, {1 }, {1,1 }, {1,1 }, {1,1 }, {1,1,1 } . '... |
Editorial of Codeforces Global Round 21 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
161827545 | leukocyte | H | June 26, 2022, 4:25 a.m. | OK | GNU C++14 | TESTS | 154 | 842 | 1126400 | ||
161799702 | Incursion15 | H | June 25, 2022, 5:37 p.m. | OK | GNU C++14 | TESTS | 154 | 1045 | 11673600 | ||
161794503 | csyakuoi | H | June 25, 2022, 4:41 p.m. | OK | GNU C++17 (64) | TESTS | 154 | 452 | 11776000 | ||
161832224 | zihouzhong | H | June 26, 2022, 5:59 a.m. | OK | GNU C++17 (64) | TESTS | 154 | 483 | 1228800 | ||
161804552 | rainboy | H | June 25, 2022, 6:20 p.m. | OK | GNU C++17 (64) | TESTS | 154 | 561 | 5529600 | ||
161827655 | leukocyte | H | June 26, 2022, 4:28 a.m. | OK | GNU C++20 (64) | TESTS | 154 | 327 | 1228800 | ||
161788723 | tourist | H | June 25, 2022, 4:20 p.m. | OK | GNU C++20 (64) | TESTS | 154 | 374 | 2867200 | ||
161804426 | maroonrk | H | June 25, 2022, 6:18 p.m. | OK | GNU C++20 (64) | TESTS | 154 | 452 | 1331200 | ||
161804161 | Efimova_kamila | H | June 25, 2022, 6:16 p.m. | OK | GNU C++20 (64) | TESTS | 154 | 733 | 1331200 | ||
161794107 | jiangly | H | June 25, 2022, 4:40 p.m. | OK | GNU C++20 (64) | TESTS | 154 | 733 | 1331200 | ||
161807017 | Radewoosh | H | June 25, 2022, 6:52 p.m. | OK | GNU C++20 (64) | TESTS | 154 | 1497 | 51609600 |
Back to search problems