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 |
---|---|---|---|---|---|---|
1264 | Codeforces Round 604 (Div. 1) | FINISHED | False | 7200 | 156266699 | Dec. 5, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1171 ) | C | Beautiful Mirrors with queries | PROGRAMMING | data structures probabilities | 2400 |
B'Creatnx has n mirrors, numbered from 1 to n . Every day, Creatnx asks exactly one mirror "Am I beautiful?". The i -th mirror will tell Creatnx that he is beautiful with probability frac{p_i}{100} for all 1 <= i <= n . Some mirrors are called checkpoints. Initially, only the 1 st mirror is a checkpoint. It remains a checkpoint all the time. Creatnx asks the mirrors one by one, starting from the 1 -st mirror. Every day, if he asks i -th mirror, there are two possibilities: There are some changes occur over time: some mirrors become new checkpoints and some mirrors are no longer checkpoints. You are given q queries, each query is represented by an integer u : If the u -th mirror isn 't a checkpoint then we set it as a checkpoint. Otherwise, the u -th mirror is no longer a checkpoint. After each query, you need to calculate the expected number of days until Creatnx becomes happy. Each of this numbers should be found by modulo 998244353 . Formally, let M = 998244353 . 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 x that 0 <= x < M and x cdot q equiv p pmod{M} . The first line contains two integers n , q ( 2 <= q n, q <= 2 cdot 10^5 ) -- the number of mirrors and queries. The second line contains n integers: p_1, p_2, ldots, p_n ( 1 <= q p_i <= q 100 ). Each of q following lines contains a single integer u ( 2 <= q u <= q n ) -- next query. Print q numbers xe2 x80 x93 the answers after each query by modulo 998244353 . In the first test after the first query, the first and the second mirrors are checkpoints. Creatnx will ask the first mirror until it will say that he is beautiful, after t'... |
71995 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
66333662 | hos.lyric | C | Dec. 5, 2019, 3:07 p.m. | OK | D | TESTS | 37 | 795 | 22630400 | 2400 | |
66414502 | iica | C | Dec. 6, 2019, 4:32 p.m. | OK | D | TESTS | 37 | 920 | 98201600 | 2400 | |
66417741 | rainboy | C | Dec. 6, 2019, 5:42 p.m. | OK | GNU C11 | TESTS | 37 | 1231 | 4198400 | 2400 | |
66434546 | ouuan | C | Dec. 7, 2019, 5:30 a.m. | OK | GNU C++11 | TESTS | 37 | 171 | 11264000 | 2400 | |
66384874 | henryrabbit | C | Dec. 6, 2019, 7:07 a.m. | OK | GNU C++11 | TESTS | 37 | 249 | 12902400 | 2400 | |
66615227 | DWAE86 | C | Dec. 11, 2019, 3:10 a.m. | OK | GNU C++11 | TESTS | 37 | 280 | 13619200 | 2400 | |
66782826 | tyler178 | C | Dec. 13, 2019, 12:37 p.m. | OK | GNU C++11 | TESTS | 37 | 296 | 9625600 | 2400 | |
66346414 | saba2000 | C | Dec. 5, 2019, 3:50 p.m. | OK | GNU C++11 | TESTS | 37 | 296 | 12083200 | 2400 | |
66573976 | Lanly | C | Dec. 10, 2019, 6:18 a.m. | OK | GNU C++11 | TESTS | 37 | 296 | 12902400 | 2400 | |
66396231 | LJC00118 | C | Dec. 6, 2019, 10:54 a.m. | OK | GNU C++11 | TESTS | 37 | 296 | 20889600 | 2400 | |
69174767 | X_o_r | C | Jan. 20, 2020, 7:39 a.m. | OK | GNU C++11 | TESTS | 37 | 311 | 8806400 | 2400 | |
66897891 | EncodeTalker | C | Dec. 15, 2019, 3:19 a.m. | OK | GNU C++11 | TESTS | 37 | 311 | 13721600 | 2400 | |
66351998 | rng_78 | C | Dec. 5, 2019, 4:12 p.m. | OK | GNU C++11 | TESTS | 37 | 312 | 14438400 | 2400 | |
66376069 | jiangly | C | Dec. 6, 2019, 2:48 a.m. | OK | GNU C++14 | TESTS | 37 | 327 | 9830400 | 2400 | |
66453844 | AkaiLemon | C | Dec. 7, 2019, 12:27 p.m. | OK | GNU C++14 | TESTS | 37 | 327 | 11673600 | 2400 | |
66362859 | yan-zp | C | Dec. 5, 2019, 6:26 p.m. | OK | GNU C++14 | TESTS | 37 | 342 | 9830400 | 2400 | |
66372142 | emma | C | Dec. 5, 2019, 11:13 p.m. | OK | GNU C++14 | TESTS | 37 | 342 | 9830400 | 2400 | |
66410013 | ytriayggg | C | Dec. 6, 2019, 2:59 p.m. | OK | GNU C++14 | TESTS | 37 | 343 | 9830400 | 2400 | |
66343223 | Kostroma | C | Dec. 5, 2019, 3:38 p.m. | OK | GNU C++14 | TESTS | 37 | 343 | 13004800 | 2400 | |
66361542 | yan-zp | C | Dec. 5, 2019, 6:09 p.m. | OK | GNU C++14 | TESTS | 37 | 358 | 9830400 | 2400 | |
66391417 | 19992147 | C | Dec. 6, 2019, 9:15 a.m. | OK | GNU C++14 | TESTS | 37 | 358 | 9830400 | 2400 | |
66367161 | Arg_007 | C | Dec. 5, 2019, 7:55 p.m. | OK | GNU C++14 | TESTS | 37 | 358 | 12185600 | 2400 | |
66575662 | doped.silicon | C | Dec. 10, 2019, 7:12 a.m. | OK | GNU C++14 | TESTS | 37 | 358 | 13004800 | 2400 | |
66788038 | saketh | C | Dec. 13, 2019, 2:19 p.m. | OK | GNU C++17 | TESTS | 37 | 233 | 6451200 | 2400 | |
66787871 | saketh | C | Dec. 13, 2019, 2:16 p.m. | OK | GNU C++17 | TESTS | 37 | 249 | 7270400 | 2400 | |
67850511 | Eliden | C | Dec. 29, 2019, 2:31 a.m. | OK | GNU C++17 | TESTS | 37 | 265 | 17612800 | 2400 | |
66342907 | alex9801 | C | Dec. 5, 2019, 3:37 p.m. | OK | GNU C++17 | TESTS | 37 | 280 | 10035200 | 2400 | |
66386020 | codgician | C | Dec. 6, 2019, 7:32 a.m. | OK | GNU C++17 | TESTS | 37 | 296 | 13004800 | 2400 | |
66479427 | BIT-silence | C | Dec. 8, 2019, 12:19 a.m. | OK | GNU C++17 | TESTS | 37 | 311 | 40345600 | 2400 | |
66361252 | loujunjie | C | Dec. 5, 2019, 6:07 p.m. | OK | GNU C++17 | TESTS | 37 | 312 | 10854400 | 2400 | |
66479490 | BIT-silence | C | Dec. 8, 2019, 12:26 a.m. | OK | GNU C++17 | TESTS | 37 | 312 | 40345600 | 2400 | |
66350491 | betrue12 | C | Dec. 5, 2019, 4:06 p.m. | OK | GNU C++17 | TESTS | 37 | 326 | 7270400 | 2400 | |
66405231 | chielo | C | Dec. 6, 2019, 1:29 p.m. | OK | GNU C++17 | TESTS | 37 | 326 | 19456000 | 2400 | |
66417744 | Dukkha | C | Dec. 6, 2019, 5:42 p.m. | OK | Java 11 | TESTS | 37 | 1075 | 0 | 2400 | |
66404384 | DarLam | C | Dec. 6, 2019, 1:15 p.m. | OK | Java 8 | TESTS | 37 | 592 | 10956800 | 2400 | |
66520685 | beginner1010 | C | Dec. 8, 2019, 10:11 p.m. | OK | Java 8 | TESTS | 37 | 732 | 7372800 | 2400 | |
66354703 | mikit | C | Dec. 5, 2019, 4:23 p.m. | OK | Java 8 | TESTS | 37 | 904 | 33382400 | 2400 | |
66477988 | fetetriste | C | Dec. 7, 2019, 10:26 p.m. | OK | Java 8 | TESTS | 37 | 1279 | 186163200 | 2400 | |
66748662 | dalt | C | Dec. 13, 2019, 4:36 a.m. | OK | Java 8 | TESTS | 37 | 1450 | 180121600 | 2400 | |
66520624 | beginner1010 | C | Dec. 8, 2019, 10:07 p.m. | OK | Java 8 | TESTS | 37 | 1513 | 9420800 | 2400 | |
66832714 | spar5h | C | Dec. 14, 2019, 10:49 a.m. | OK | Java 8 | TESTS | 37 | 1638 | 19763200 | 2400 | |
66611855 | icpc_loser | C | Dec. 10, 2019, 10:32 p.m. | OK | Java 8 | TESTS | 37 | 1668 | 25292800 | 2400 | |
66361321 | Nutella3000 | C | Dec. 5, 2019, 6:07 p.m. | OK | Java 8 | TESTS | 37 | 1731 | 170291200 | 2400 | |
66351299 | dalt | C | Dec. 5, 2019, 4:10 p.m. | OK | Java 8 | TESTS | 37 | 1918 | 172953600 | 2400 | |
66482828 | Spheniscine | C | Dec. 8, 2019, 4:10 a.m. | OK | Kotlin | TESTS | 37 | 857 | 33280000 | 2400 | |
66498061 | Spheniscine | C | Dec. 8, 2019, 11:21 a.m. | OK | Kotlin | TESTS | 37 | 920 | 33587200 | 2400 | |
66554217 | Tlatoani | C | Dec. 9, 2019, 4:05 p.m. | OK | Kotlin | TESTS | 37 | 1185 | 24064000 | 2400 | |
66423557 | darkkcyan | C | Dec. 6, 2019, 8:02 p.m. | OK | Kotlin | TESTS | 37 | 1341 | 19865600 | 2400 | |
66554340 | Tlatoani | C | Dec. 9, 2019, 4:08 p.m. | OK | Kotlin | TESTS | 37 | 1450 | 24371200 | 2400 | |
66554066 | Tlatoani | C | Dec. 9, 2019, 4:02 p.m. | OK | Kotlin | TESTS | 37 | 1778 | 29286400 | 2400 | |
66352207 | Apsara | C | Dec. 5, 2019, 4:13 p.m. | OK | MS C++ | TESTS | 37 | 764 | 16076800 | 2400 | |
68945552 | AleksanderBalobanov | C | Jan. 16, 2020, 4:01 p.m. | OK | MS C++ 2017 | TESTS | 37 | 857 | 18022400 | 2400 | |
66391718 | Timonnable | C | Dec. 6, 2019, 9:21 a.m. | OK | MS C++ 2017 | TESTS | 37 | 1278 | 21094400 | 2400 | |
66353907 | Khas_Profit_LLC | C | Dec. 5, 2019, 4:20 p.m. | OK | MS C++ 2017 | TESTS | 37 | 1466 | 41984000 | 2400 | |
66548530 | yumtam | C | Dec. 9, 2019, 2:02 p.m. | OK | PyPy 2 | TESTS | 37 | 1512 | 21401600 | 2400 | |
66371802 | pineriver | C | Dec. 5, 2019, 10:52 p.m. | OK | PyPy 3 | TESTS | 37 | 1622 | 104960000 | 2400 | |
66371270 | sansen | C | Dec. 5, 2019, 10:21 p.m. | OK | Rust | TESTS | 37 | 467 | 13107200 | 2400 | |
66371046 | sansen | C | Dec. 5, 2019, 10:10 p.m. | OK | Rust | TESTS | 37 | 467 | 13107200 | 2400 | |
67211539 | gearjack | C | Dec. 19, 2019, 2:12 p.m. | OK | Rust | TESTS | 37 | 607 | 21299200 | 2400 | |
66367452 | sansen | C | Dec. 5, 2019, 8:03 p.m. | OK | Rust | TESTS | 37 | 795 | 15257600 | 2400 | |
66368569 | sansen | C | Dec. 5, 2019, 8:37 p.m. | OK | Rust | TESTS | 37 | 795 | 17305600 | 2400 | |
66367046 | sansen | C | Dec. 5, 2019, 7:51 p.m. | OK | Rust | TESTS | 37 | 826 | 15257600 | 2400 | |
66366768 | sansen | C | Dec. 5, 2019, 7:44 p.m. | OK | Rust | TESTS | 37 | 842 | 15257600 | 2400 | |
66367097 | sansen | C | Dec. 5, 2019, 7:53 p.m. | OK | Rust | TESTS | 37 | 1169 | 15257600 | 2400 | |
66349518 | sansen | C | Dec. 5, 2019, 4:03 p.m. | OK | Rust | TESTS | 37 | 1325 | 15257600 | 2400 |
Back to search problems