Educational Codeforces Round 95 (Rated for Div. 2)

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
1418 Educational Codeforces Round 95 (Rated for Div. 2) FINISHED False 7200 137258711 Sept. 14, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1905 ) E Expected Damage PROGRAMMING binary search combinatorics math probabilities

B'You are playing a computer game. In this game, you have to fight n monsters. To defend from monsters, you need a shield. Each shield has two parameters: its current durability a and its defence rating b . Each monster has only one parameter: its strength d . When you fight a monster with strength d while having a shield with current durability a and defence b , there are three possible outcomes: The i -th monster has strength d_i , and you will fight each of the monsters exactly once, in some random order (all n! orders are equiprobable). You have to consider m different shields, the i -th shield has initial durability a_i and defence rating b_i . For each shield, calculate the expected amount of damage you will receive if you take this shield and fight the given n monsters in random order. The first line contains two integers n and m ( 1 <= n, m <= 2 cdot 10^5 ) -- the number of monsters and the number of shields, respectively. The second line contains n integers d_1 , d_2 , ..., d_n ( 1 <= d_i <= 10^9 ), where d_i is the strength of the i -th monster. Then m lines follow, the i -th of them contains two integers a_i and b_i ( 1 <= a_i <= n ; 1 <= b_i <= 10^9 ) -- the description of the i -th shield. Print m integers, where the i -th integer represents the expected damage you receive with the i -th shield as follows: it can be proven that, for each shield, the expected damage is an irreducible fraction dfrac{x}{y} , where y is coprime with 998244353 . You have to print the value of x cdot y^{-1} bmod 998244353 , where y^{-1} is the inverse element for y ( y cdot y^{-1} bmod 998244353 = 1 ). '...

Tutorials

Unofficial Editorial for Educational Round 95 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
92867019 lz.askey E Sept. 15, 2020, 2:36 a.m. OK GNU C++11 TESTS 44 186 1638400
92836486 juruo1086 E Sept. 14, 2020, 4:20 p.m. OK GNU C++11 TESTS 44 187 3174400
92833814 Mila_brz E Sept. 14, 2020, 4:08 p.m. OK GNU C++11 TESTS 44 202 9420800
92867915 charlieyan E Sept. 15, 2020, 3:03 a.m. OK GNU C++11 TESTS 44 218 2150400
92863822 sunzihao E Sept. 15, 2020, 12:29 a.m. OK GNU C++11 TESTS 44 218 6451200
92834484 Gay-Gay E Sept. 14, 2020, 4:11 p.m. OK GNU C++11 TESTS 44 218 7270400
92868359 He_Ren E Sept. 15, 2020, 3:15 a.m. OK GNU C++11 TESTS 44 218 8601600
92838093 Mackerel_Pike E Sept. 14, 2020, 4:27 p.m. OK GNU C++11 TESTS 44 233 6451200
92864229 Durant_Lee E Sept. 15, 2020, 12:50 a.m. OK GNU C++11 TESTS 44 234 1638400
92843881 Abrar_Hussain_Dar E Sept. 14, 2020, 5:08 p.m. OK GNU C++11 TESTS 44 234 3174400
92874780 Drice E Sept. 15, 2020, 5:46 a.m. OK GNU C++14 TESTS 44 218 11161600
92871152 AkaiLemon E Sept. 15, 2020, 4:30 a.m. OK GNU C++14 TESTS 44 233 5632000
92871321 AkaiLemon E Sept. 15, 2020, 4:34 a.m. OK GNU C++14 TESTS 44 233 7270400
92830709 g00d_vegetable E Sept. 14, 2020, 3:56 p.m. OK GNU C++14 TESTS 44 265 5632000
92872957 elvahs E Sept. 15, 2020, 5:11 a.m. OK GNU C++14 TESTS 44 280 1638400
92845492 xb0nS E Sept. 14, 2020, 5:24 p.m. OK GNU C++14 TESTS 44 296 2457600
92862337 siddhugzp E Sept. 14, 2020, 11:04 p.m. OK GNU C++14 TESTS 44 311 3174400
92838496 AKJ0811 E Sept. 14, 2020, 4:29 p.m. OK GNU C++14 TESTS 44 326 6963200
92850770 marcOS E Sept. 14, 2020, 6:24 p.m. OK GNU C++14 TESTS 44 327 7987200
92858725 Charbel11 E Sept. 14, 2020, 8:34 p.m. OK GNU C++14 TESTS 44 342 6451200
92834556 Unsterblicher_Geist E Sept. 14, 2020, 4:12 p.m. OK GNU C++17 TESTS 44 124 10035200
92838319 vanvector E Sept. 14, 2020, 4:28 p.m. OK GNU C++17 TESTS 44 249 2457600
92873216 Bugman E Sept. 15, 2020, 5:17 a.m. OK GNU C++17 TESTS 44 249 4198400
92836469 Andreasyan E Sept. 14, 2020, 4:20 p.m. OK GNU C++17 TESTS 44 249 5632000
92838400 tloinuy E Sept. 14, 2020, 4:29 p.m. OK GNU C++17 TESTS 44 264 7270400
92842696 greencis E Sept. 14, 2020, 4:56 p.m. OK GNU C++17 TESTS 44 265 2457600
92836253 tob123 E Sept. 14, 2020, 4:19 p.m. OK GNU C++17 TESTS 44 265 15155200
92848941 tourist E Sept. 14, 2020, 6:02 p.m. OK GNU C++17 TESTS 44 280 1740800
92849943 SumanPradhan E Sept. 14, 2020, 6:14 p.m. OK GNU C++17 TESTS 44 280 4812800
92833801 tiger0130 E Sept. 14, 2020, 4:08 p.m. OK GNU C++17 TESTS 44 280 6656000
92857002 smax E Sept. 14, 2020, 7:54 p.m. OK GNU C++17 (64) TESTS 44 186 2457600
92837514 Rahul E Sept. 14, 2020, 4:25 p.m. OK GNU C++17 (64) TESTS 44 187 3993600
92832181 Anachor E Sept. 14, 2020, 4:02 p.m. OK GNU C++17 (64) TESTS 44 187 5632000
92833892 Eureka17 E Sept. 14, 2020, 4:09 p.m. OK GNU C++17 (64) TESTS 44 187 6451200
92829848 iaNTU E Sept. 14, 2020, 3:53 p.m. OK GNU C++17 (64) TESTS 44 187 13004800
92852468 YouKn0wWho E Sept. 14, 2020, 6:46 p.m. OK GNU C++17 (64) TESTS 44 202 1638400
92846720 hugh.jass E Sept. 14, 2020, 5:37 p.m. OK GNU C++17 (64) TESTS 44 202 1638400
92839088 Felerius E Sept. 14, 2020, 4:31 p.m. OK GNU C++17 (64) TESTS 44 202 1638400
92860661 Svlad_Cjelli E Sept. 14, 2020, 9:38 p.m. OK GNU C++17 (64) TESTS 44 202 3276800
92845266 st1vdy E Sept. 14, 2020, 5:22 p.m. OK GNU C++17 (64) TESTS 44 202 3276800
92843301 synapse E Sept. 14, 2020, 5:02 p.m. OK Go TESTS 44 748 6041600
92836778 uwi E Sept. 14, 2020, 4:21 p.m. OK Java 11 TESTS 44 389 0
92862227 Apfeloxid E Sept. 14, 2020, 10:57 p.m. OK Java 11 TESTS 44 576 2355200
92849656 bobib E Sept. 14, 2020, 6:10 p.m. OK Java 11 TESTS 44 623 0
92863269 flyman3046 E Sept. 15, 2020, midnight OK Java 8 TESTS 44 748 3174400
92863130 flyman3046 E Sept. 14, 2020, 11:52 p.m. OK Java 8 TESTS 44 748 3174400
92851115 pulkit14 E Sept. 14, 2020, 6:28 p.m. OK Java 8 TESTS 44 811 7270400
92832768 Hemose E Sept. 14, 2020, 4:04 p.m. OK Java 8 TESTS 44 904 19763200
92835373 2020akadaver E Sept. 14, 2020, 4:15 p.m. OK Java 8 TESTS 44 982 4710400
92841991 darnley E Sept. 14, 2020, 4:50 p.m. OK Kotlin TESTS 44 1028 37580800
92845630 azukun E Sept. 14, 2020, 5:26 p.m. OK Mono C# TESTS 44 514 30208000
92866533 mban259 E Sept. 15, 2020, 2:20 a.m. OK Mono C# TESTS 44 545 30515200
92828024 eSeF_ E Sept. 14, 2020, 3:47 p.m. OK Mono C# TESTS 44 1153 36352000
92831022 Friska E Sept. 14, 2020, 3:58 p.m. OK MS C++ 2017 TESTS 44 1513 5632000
92845698 potpath E Sept. 14, 2020, 5:26 p.m. OK PyPy 2 TESTS 44 1669 23244800
92853263 gintoki_s E Sept. 14, 2020, 6:57 p.m. OK PyPy 3 TESTS 44 764 21504000
92851756 kclee2172 E Sept. 14, 2020, 6:36 p.m. OK PyPy 3 TESTS 44 888 51814400
92851948 kclee2172 E Sept. 14, 2020, 6:39 p.m. OK PyPy 3 TESTS 44 936 51507200
92838573 conqueror_of_tourist E Sept. 14, 2020, 4:29 p.m. OK PyPy 3 TESTS 44 1091 43417600
92837492 conqueror_of_tourist E Sept. 14, 2020, 4:25 p.m. OK PyPy 3 TESTS 44 1138 44851200
92843386 FlakeLCR E Sept. 14, 2020, 5:03 p.m. OK PyPy 3 TESTS 44 1169 25395200
92841085 FlakeLCR E Sept. 14, 2020, 4:43 p.m. OK PyPy 3 TESTS 44 1185 25088000
92842746 conqueror_of_tourist E Sept. 14, 2020, 4:57 p.m. OK PyPy 3 TESTS 44 1200 43315200
92830120 FlakeLCR E Sept. 14, 2020, 3:54 p.m. OK PyPy 3 TESTS 44 1232 24473600
92844800 SPD_9X2 E Sept. 14, 2020, 5:17 p.m. OK PyPy 3 TESTS 44 1309 82534400
92863652 sansen E Sept. 15, 2020, 12:20 a.m. OK Rust TESTS 44 234 9011200

remove filters

Back to search problems