Codeforces Round 697 (Div. 3)

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
1475 Codeforces Round 697 (Div. 3) FINISHED False 7200 125679563 Jan. 25, 2021, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14129 ) E Advertising Agency PROGRAMMING combinatorics implementation math sortings

B'Masha works in an advertising agency. In order to promote the new brand, she wants to conclude contracts with some bloggers. In total, Masha has connections of n different bloggers. Blogger numbered i has a_i followers. Since Masha has a limited budget, she can only sign a contract with k different bloggers. Of course, Masha wants her ad to be seen by as many people as possible. Therefore, she must hire bloggers with the maximum total number of followers. Help her, find the number of ways to select k bloggers so that the total number of their followers is maximum possible. Two ways are considered different if there is at least one blogger in the first way, which is not in the second way. Masha believes that all bloggers have different followers (that is, there is no follower who would follow two different bloggers). For example, if n=4 , k=3 , a=[1, 3, 1, 2] , then Masha has two ways to select 3 bloggers with the maximum total number of followers: Since the answer can be quite large, output it modulo 10^9+7 . The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of test cases. Then t test cases follow. The first line of each test case contains two integers n and k ( 1 <= k <= n <= 1000 ) -- the number of bloggers and how many of them you can sign a contract with. The second line of each test case contains n integers a_1, a_2, ldots a_n ( 1 <= a_i <= n ) -- the number of followers of each blogger. It is guaranteed that the sum of n over all test cases does not exceed 1000 . For each test case, on a separate line output one integer -- the number of ways to select k bloggers so that the total number of their followers is maximum possible. The test case is explained in the statements. In the second test case, the following ways are valid: In the third test case, the following ways are valid: '...

Tutorials

Codeforces Round #697 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
105442859 wbscd E Jan. 26, 2021, 5:46 a.m. OK GNU C++11 TESTS 6 15 0
105440045 lzxzz E Jan. 26, 2021, 5:11 a.m. OK GNU C++11 TESTS 6 15 0
105437688 14385423 E Jan. 26, 2021, 4:35 a.m. OK GNU C++11 TESTS 6 15 0
105437070 SolunarG E Jan. 26, 2021, 4:23 a.m. OK GNU C++11 TESTS 6 15 0
105436947 kobietYEU E Jan. 26, 2021, 4:20 a.m. OK GNU C++11 TESTS 6 15 0
105435467 hnust_hxr E Jan. 26, 2021, 3:52 a.m. OK GNU C++11 TESTS 6 15 0
105434488 double_bug E Jan. 26, 2021, 3:33 a.m. OK GNU C++11 TESTS 6 15 0
105432348 Mister_TT E Jan. 26, 2021, 2:51 a.m. OK GNU C++11 TESTS 6 15 0
105431686 Jhin_ E Jan. 26, 2021, 2:37 a.m. OK GNU C++11 TESTS 6 15 0
105431480 icarryu E Jan. 26, 2021, 2:32 a.m. OK GNU C++11 TESTS 6 15 0
105442453 _bipulsingh E Jan. 26, 2021, 5:42 a.m. OK GNU C++14 TESTS 6 15 0
105441997 khyati29agrawal E Jan. 26, 2021, 5:36 a.m. OK GNU C++14 TESTS 6 15 0
105440857 aditya_01 E Jan. 26, 2021, 5:22 a.m. OK GNU C++14 TESTS 6 15 0
105440594 dikshaSinghal E Jan. 26, 2021, 5:18 a.m. OK GNU C++14 TESTS 6 15 0
105439305 faizalam E Jan. 26, 2021, 5:01 a.m. OK GNU C++14 TESTS 6 15 0
105437271 Hidder E Jan. 26, 2021, 4:26 a.m. OK GNU C++14 TESTS 6 15 0
105436391 DEAD_POOL2001 E Jan. 26, 2021, 4:10 a.m. OK GNU C++14 TESTS 6 15 0
105435475 dmdivyansh_113 E Jan. 26, 2021, 3:53 a.m. OK GNU C++14 TESTS 6 15 0
105434647 PRI1603 E Jan. 26, 2021, 3:35 a.m. OK GNU C++14 TESTS 6 15 0
105433687 qdnoip E Jan. 26, 2021, 3:17 a.m. OK GNU C++14 TESTS 6 15 0
105444049 shahayush457 E Jan. 26, 2021, 6:01 a.m. OK GNU C++17 TESTS 6 15 0
105443899 sancpp E Jan. 26, 2021, 5:59 a.m. OK GNU C++17 TESTS 6 15 0
105443627 ris E Jan. 26, 2021, 5:55 a.m. OK GNU C++17 TESTS 6 15 0
105443175 9en E Jan. 26, 2021, 5:50 a.m. OK GNU C++17 TESTS 6 15 0
105442313 andre-lz E Jan. 26, 2021, 5:40 a.m. OK GNU C++17 TESTS 6 15 0
105441123 Doublade E Jan. 26, 2021, 5:26 a.m. OK GNU C++17 TESTS 6 15 0
105440690 Darshann E Jan. 26, 2021, 5:19 a.m. OK GNU C++17 TESTS 6 15 0
105440680 sumitks866 E Jan. 26, 2021, 5:19 a.m. OK GNU C++17 TESTS 6 15 0
105440644 TimDing E Jan. 26, 2021, 5:19 a.m. OK GNU C++17 TESTS 6 15 0
105440244 codeslayer1326 E Jan. 26, 2021, 5:13 a.m. OK GNU C++17 TESTS 6 15 0
105433474 AccioAC E Jan. 26, 2021, 3:12 a.m. OK GNU C++17 (64) TESTS 6 0 0
105431091 Zhabka E Jan. 26, 2021, 2:23 a.m. OK GNU C++17 (64) TESTS 6 0 1638400
105439713 DanielMontes E Jan. 26, 2021, 5:06 a.m. OK GNU C++17 (64) TESTS 6 15 0
105439643 L1ngYu233 E Jan. 26, 2021, 5:06 a.m. OK GNU C++17 (64) TESTS 6 15 0
105437277 agarwala2512 E Jan. 26, 2021, 4:26 a.m. OK GNU C++17 (64) TESTS 6 15 0
105435988 koderkushy E Jan. 26, 2021, 4:03 a.m. OK GNU C++17 (64) TESTS 6 15 0
105432893 izumiQR E Jan. 26, 2021, 3:02 a.m. OK GNU C++17 (64) TESTS 6 15 0
105430253 Love_seventeen E Jan. 26, 2021, 2:01 a.m. OK GNU C++17 (64) TESTS 6 15 0
105429070 Paniago E Jan. 26, 2021, 1:25 a.m. OK GNU C++17 (64) TESTS 6 15 0
105422010 Ayalla E Jan. 25, 2021, 9:39 p.m. OK GNU C++17 (64) TESTS 6 15 0
105427943 watarimaycry2 E Jan. 26, 2021, 12:53 a.m. OK Java 11 TESTS 6 155 0
105410785 Abhi_Valani E Jan. 25, 2021, 6:27 p.m. OK Java 11 TESTS 6 156 0
105443106 ryanranaut E Jan. 26, 2021, 5:49 a.m. OK Java 11 TESTS 6 171 0
105431526 Restricted stelkasouridis E Jan. 26, 2021, 2:33 a.m. OK Java 11 TESTS 6 171 0
105429752 anhpp E Jan. 26, 2021, 1:47 a.m. OK Java 11 TESTS 6 171 0
105427481 bobbilyking E Jan. 26, 2021, 12:37 a.m. OK Java 11 TESTS 6 171 0
105415509 saurabh_kl E Jan. 25, 2021, 7:28 p.m. OK Java 11 TESTS 6 171 0
105409932 gssakash E Jan. 25, 2021, 6:17 p.m. OK Java 11 TESTS 6 171 0
105408726 SaberXpro E Jan. 25, 2021, 6:05 p.m. OK Java 11 TESTS 6 171 0
105403523 afrizal E Jan. 25, 2021, 5:23 p.m. OK Java 11 TESTS 6 171 0
105419119 RonWonWon E Jan. 25, 2021, 8:33 p.m. OK Java 8 TESTS 6 108 0
105402614 a155b55 E Jan. 25, 2021, 5:17 p.m. OK Java 8 TESTS 6 108 0
105436600 sumitnitesh123 E Jan. 26, 2021, 4:14 a.m. OK Java 8 TESTS 6 108 4915200
105432466 zxxhh E Jan. 26, 2021, 2:53 a.m. OK Java 8 TESTS 6 109 0
105421367 Int_resting_coder E Jan. 25, 2021, 9:23 p.m. OK Java 8 TESTS 6 109 0
105413609 2018uch1533 E Jan. 25, 2021, 7 p.m. OK Java 8 TESTS 6 109 0
105443846 Prakrit18 E Jan. 26, 2021, 5:58 a.m. OK Java 8 TESTS 6 124 0
105442456 ygonepiece E Jan. 26, 2021, 5:42 a.m. OK Java 8 TESTS 6 124 0
105425787 EsraaSalah E Jan. 25, 2021, 11:35 p.m. OK Java 8 TESTS 6 124 0
105419488 RonWonWon E Jan. 25, 2021, 8:40 p.m. OK Java 8 TESTS 6 124 0
105427675 Spheniscine E Jan. 26, 2021, 12:44 a.m. OK Kotlin TESTS 6 124 0
105420314 koper E Jan. 25, 2021, 8:58 p.m. OK Kotlin TESTS 6 155 1740800
105415163 LeoPro E Jan. 25, 2021, 7:23 p.m. OK Kotlin TESTS 6 155 1740800
105406291 MikuSakula E Jan. 25, 2021, 5:43 p.m. OK MS C++ 2017 TESTS 6 15 0
105438511 Suny_ E Jan. 26, 2021, 4:48 a.m. OK MS C++ 2017 TESTS 6 30 0
105439002 ovo_1 E Jan. 26, 2021, 4:56 a.m. OK MS C++ 2017 TESTS 6 30 4096000
105405720 jackcaptain E Jan. 25, 2021, 5:38 p.m. OK MS C++ 2017 TESTS 6 30 8089600
105403510 WCmidschool E Jan. 25, 2021, 5:23 p.m. OK MS C++ 2017 TESTS 6 31 819200
105437173 jagajang E Jan. 26, 2021, 4:25 a.m. OK MS C++ 2017 TESTS 6 31 4096000
105415409 ustaritz E Jan. 25, 2021, 7:26 p.m. OK MS C++ 2017 TESTS 6 670 7987200
105409035 amayapetako E Jan. 25, 2021, 6:08 p.m. OK PyPy 3 TESTS 6 77 1536000
105432446 Ilsa E Jan. 26, 2021, 2:53 a.m. OK PyPy 3 TESTS 6 92 2048000
105402673 Rottenblasters E Jan. 25, 2021, 5:17 p.m. OK PyPy 3 TESTS 6 93 1126400
105414846 InvalidSyntax E Jan. 25, 2021, 7:17 p.m. OK PyPy 3 TESTS 6 93 1228800
105412123 NotAHaxxor E Jan. 25, 2021, 6:43 p.m. OK PyPy 3 TESTS 6 93 1228800
105439660 uttharapally.chandra E Jan. 26, 2021, 5:06 a.m. OK PyPy 3 TESTS 6 93 1331200
105413117 code026 E Jan. 25, 2021, 6:54 p.m. OK PyPy 3 TESTS 6 93 1331200
105407776 timolai.andrievitch E Jan. 25, 2021, 5:56 p.m. OK PyPy 3 TESTS 6 93 1331200
105402638 sagal E Jan. 25, 2021, 5:17 p.m. OK PyPy 3 TESTS 6 93 1331200
105430367 busking2 E Jan. 26, 2021, 2:05 a.m. OK PyPy 3 TESTS 6 93 1433600
105407940 FlakeLCR E Jan. 25, 2021, 5:58 p.m. OK Python 3 TESTS 6 46 0
105429656 ankan2526 E Jan. 26, 2021, 1:44 a.m. OK Python 3 TESTS 6 46 716800
105402212 doni69 E Jan. 25, 2021, 5:15 p.m. OK Python 3 TESTS 6 61 0
105435508 kevin32 E Jan. 26, 2021, 3:53 a.m. OK Python 3 TESTS 6 61 204800
105402118 divyavani_kusuma E Jan. 25, 2021, 5:14 p.m. OK Python 3 TESTS 6 61 307200
105428990 Bhagi__77 E Jan. 26, 2021, 1:23 a.m. OK Python 3 TESTS 6 62 307200
105421826 wyrm E Jan. 25, 2021, 9:34 p.m. OK Python 3 TESTS 6 62 307200
105404017 harshdypiu E Jan. 25, 2021, 5:26 p.m. OK Python 3 TESTS 6 62 307200
105403402 Prajapat E Jan. 25, 2021, 5:22 p.m. OK Python 3 TESTS 6 62 307200
105429088 phuocchubeo E Jan. 26, 2021, 1:26 a.m. OK Python 3 TESTS 6 62 716800
105432106 satylogin E Jan. 26, 2021, 2:46 a.m. OK Rust TESTS 6 15 102400
105439329 satylogin E Jan. 26, 2021, 5:01 a.m. OK Rust TESTS 6 30 102400

remove filters

Back to search problems