Codeforces Round 880 (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
1835 Codeforces Round 880 (Div. 1) FINISHED False 7200 44724299 June 18, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 230 ) E Old Mobile PROGRAMMING dp math probabilities

B"During the latest mission of the starship U.S.S. Coder, Captain Jan Bitovsky was accidentally teleported to the surface of an unknown planet. Trying to find his way back, Jan found an artifact from planet Earth's ancient civilization -- a mobile device capable of interstellar calls created by Byterola. Unfortunately, there was another problem. Even though Jan, as a representative of humans, knew perfectly the old notation of the cell phone numbers, the symbols on the device's keyboard were completely worn down and invisible to the human eye. The old keyboards had exactly m + 1 buttons, one for each digit from the base m numerical system, and one single backspace button allowing one to erase the last written digit (if nothing was written on the screen, then this button does nothing, but it's still counted as pressed). Jan would like to communicate with his crew. He needs to type a certain number (also from the base m numerical system, that is, digits from 0 to m - 1 ). He wants to know the expected number of button presses necessary to contact the U.S.S. Coder. Jan always chooses the most optimal buttons based on his current knowledge. Buttons are indistinguishable until pressed. Help him! In the first line of input, there are two integer numbers n and m ( 1 <= n <= 10^6 , 2 <= m <= 10^3 ) -- the length of the number to U.S.S. Coder and the base of the numerical system. In the next and the last input line, there are n integers between 0 and m - 1 : the number to type in the base m numerical system. Output the expected number of button presses modulo 1 ,000 ,000 ,007 . Formally, let M = 1 ,000 ,000 ,007 . It can be shown that the answer can be expressed as an irreducible fraction frac{p}{q} , where p and q are integers and q not equiv 0 pmod{M} . Output the integer equal to p cdot q^{-1} bmod M . In other words, output such an integer $$"...

Tutorials

Codeforces Round 880 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
210184491 rainboy E June 18, 2023, 8:52 p.m. OK GNU C11 TESTS 52 140 0
210184539 rainboy E June 18, 2023, 8:53 p.m. OK GNU C11 TESTS 52 156 0
210182636 rainboy E June 18, 2023, 8:16 p.m. OK GNU C11 TESTS 52 156 0
210184257 rainboy E June 18, 2023, 8:47 p.m. OK GNU C11 TESTS 52 171 0
210176026 rainboy E June 18, 2023, 6:28 p.m. OK GNU C11 TESTS 52 187 0
210203727 monstersqaq E June 19, 2023, 5:18 a.m. OK GNU C++14 TESTS 52 1840 20275200
210184871 rainboy E June 18, 2023, 9:01 p.m. OK GNU C++17 (64) TESTS 52 140 0
210192441 Geothermal E June 19, 2023, 1:12 a.m. OK GNU C++17 (64) TESTS 52 218 96256000
210185009 icecuber E June 18, 2023, 9:05 p.m. OK GNU C++17 (64) TESTS 52 249 20275200
210189479 Pointy E June 18, 2023, 11:31 p.m. OK GNU C++17 (64) TESTS 52 311 48537600
210167680 noimi E June 18, 2023, 5:08 p.m. OK GNU C++17 (64) TESTS 52 390 133017600
210194524 Kubic E June 19, 2023, 2:11 a.m. OK GNU C++17 (64) TESTS 52 545 8089600
210173945 A_G E June 18, 2023, 6:03 p.m. OK GNU C++20 (64) TESTS 52 109 0
210186364 ecnerwala E June 18, 2023, 9:44 p.m. OK GNU C++20 (64) TESTS 52 109 3993600
210186293 ecnerwala E June 18, 2023, 9:42 p.m. OK GNU C++20 (64) TESTS 52 124 3993600
210173323 A_G E June 18, 2023, 5:56 p.m. OK GNU C++20 (64) TESTS 52 124 12083200
210169844 jiangly E June 18, 2023, 5:23 p.m. OK GNU C++20 (64) TESTS 52 233 74240000
210199970 monstersqaq E June 19, 2023, 4:03 a.m. OK GNU C++20 (64) TESTS 52 405 20275200
210194783 Linshey E June 19, 2023, 2:17 a.m. OK GNU C++20 (64) TESTS 52 624 8089600
210198354 Hritik12 E June 19, 2023, 3:36 a.m. OK GNU C++20 (64) TESTS 52 624 8089600
210154409 Um_nik E June 18, 2023, 4:05 p.m. OK GNU C++20 (64) TESTS 52 670 8192000
210181918 -0.5 E June 18, 2023, 8:02 p.m. OK GNU C++20 (64) TESTS 52 702 16384000
210199624 Tlatoani E June 19, 2023, 3:57 a.m. OK Kotlin 1.6 TESTS 52 1154 121139200

remove filters

Back to search problems