Educational Codeforces Round 156 (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
1886 Educational Codeforces Round 156 (Rated for Div. 2) FINISHED False 7200 34961099 Oct. 9, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3615 ) D Monocarp and the Set PROGRAMMING brute force combinatorics math

B'Monocarp has n numbers 1, 2, ... , n and a set (initially empty). He adds his numbers to this set n times in some order. During each step, he adds a new number (which has not been present in the set before). In other words, the sequence of added numbers is a permutation of length n . Every time Monocarp adds an element into the set except for the first time, he writes out a character: You are given a string s of n-1 characters, which represents the characters written out by Monocarp (in the order he wrote them out). You have to process m queries to the string. Each query has the following format: Both before processing the queries and after each query, you have to calculate the number of different ways to order the integers 1, 2, 3, ... , n such that, if Monocarp inserts the integers into the set in that order, he gets the string s . Since the answers might be large, print them modulo 998244353 . The first line contains two integers n and m ( 2 <= n <= 3 cdot 10^5 ; 1 <= m <= 3 cdot 10^5 ). The second line contains the string s , consisting of exactly n-1 characters <, > and/or ?. Then m lines follow. Each of them represents a query. Each line contains an integer i and a character c ( 1 <= i <= n-1 ; c is either <, >, or ?). Both before processing the queries and after each query, print one integer -- the number of ways to order the integers 1, 2, 3, ... , n such that, if Monocarp inserts the integers into the set in that order, he gets the string s . Since the answers might be large, print them modulo 998244353 . In the first example, there are three possible orderings before all queries: After the last query, there is only one possible ordering: '...

Tutorials

Educational Codeforces Round 156 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
227437283 rainboy D Oct. 9, 2023, 5:44 p.m. OK GNU C11 TESTS 7 1419 1536000
227423921 rainboy D Oct. 9, 2023, 4:37 p.m. OK GNU C11 TESTS 7 1434 2764800
227424109 node2 D Oct. 9, 2023, 4:37 p.m. OK GNU C11 TESTS 7 1528 307200
227428188 Zzzcr D Oct. 9, 2023, 4:51 p.m. OK GNU C++14 TESTS 7 124 4505600
227438525 l_returns D Oct. 9, 2023, 5:53 p.m. OK GNU C++14 TESTS 7 171 1331200
227445196 0wuming0 D Oct. 9, 2023, 6:45 p.m. OK GNU C++14 TESTS 7 171 2662400
227420736 Lemontea_ D Oct. 9, 2023, 4:31 p.m. OK GNU C++14 TESTS 7 202 307200
227428722 guominzhengdang D Oct. 9, 2023, 4:53 p.m. OK GNU C++14 TESTS 7 217 1024000
227458201 plastical D Oct. 9, 2023, 9:15 p.m. OK GNU C++14 TESTS 7 217 1024000
227424016 Yaimsea D Oct. 9, 2023, 4:37 p.m. OK GNU C++14 TESTS 7 217 3584000
227465424 lsxhyyds D Oct. 10, 2023, 12:29 a.m. OK GNU C++14 TESTS 7 218 1024000
227455337 tedi1112 D Oct. 9, 2023, 8:34 p.m. OK GNU C++14 TESTS 7 218 1024000
227425202 yeshuchen D Oct. 9, 2023, 4:40 p.m. OK GNU C++14 TESTS 7 233 1024000
227428631 JanekKwadrat D Oct. 9, 2023, 4:53 p.m. OK GNU C++17 TESTS 7 155 307200
227437688 FzArK D Oct. 9, 2023, 5:47 p.m. OK GNU C++17 TESTS 7 171 2252800
227467302 HuaLaLa D Oct. 10, 2023, 1:12 a.m. OK GNU C++17 TESTS 7 171 5017600
227467785 gabriel88766 D Oct. 10, 2023, 1:24 a.m. OK GNU C++17 TESTS 7 186 1024000
227470256 MuKYu. D Oct. 10, 2023, 2:12 a.m. OK GNU C++17 TESTS 7 186 1024000
227427342 applese D Oct. 9, 2023, 4:48 p.m. OK GNU C++17 TESTS 7 186 1536000
227468578 Shuishui_0921 D Oct. 10, 2023, 1:41 a.m. OK GNU C++17 TESTS 7 186 3481600
227460896 spiriton D Oct. 9, 2023, 10:08 p.m. OK GNU C++17 TESTS 7 187 5017600
227469982 Coreopsis D Oct. 10, 2023, 2:07 a.m. OK GNU C++17 TESTS 7 202 307200
227444206 EVENBAO D Oct. 9, 2023, 6:36 p.m. OK GNU C++17 TESTS 7 202 512000
227434549 MasterCactus D Oct. 9, 2023, 5:25 p.m. OK GNU C++17 (64) TESTS 7 46 4505600
227473611 Once_I_Liked_AGirl D Oct. 10, 2023, 3:09 a.m. OK GNU C++17 (64) TESTS 7 108 1024000
227472015 bblyyds D Oct. 10, 2023, 2:43 a.m. OK GNU C++17 (64) TESTS 7 108 3481600
227433346 21cs01033 D Oct. 9, 2023, 5:18 p.m. OK GNU C++17 (64) TESTS 7 109 1024000
227427286 Rogi52 D Oct. 9, 2023, 4:48 p.m. OK GNU C++17 (64) TESTS 7 124 1024000
227420456 lovekdl D Oct. 9, 2023, 4:30 p.m. OK GNU C++17 (64) TESTS 7 124 1024000
227447407 deepak_sriram D Oct. 9, 2023, 7:06 p.m. OK GNU C++17 (64) TESTS 7 124 1024000
227466185 qwerdkr D Oct. 10, 2023, 12:46 a.m. OK GNU C++17 (64) TESTS 7 124 1024000
227482035 Serendipity_lyy D Oct. 10, 2023, 5:06 a.m. OK GNU C++17 (64) TESTS 7 124 4915200
227437876 stan23456 D Oct. 9, 2023, 5:48 p.m. OK GNU C++17 (64) TESTS 7 124 8294400
227426964 _andyli D Oct. 9, 2023, 4:47 p.m. OK GNU C++20 (64) TESTS 7 61 3072000
227485938 nguyenquocthinhhung D Oct. 10, 2023, 5:53 a.m. OK GNU C++20 (64) TESTS 7 62 3072000
227459705 intersectingMatroids D Oct. 9, 2023, 9:43 p.m. OK GNU C++20 (64) TESTS 7 77 1024000
227463778 joaozao D Oct. 9, 2023, 11:36 p.m. OK GNU C++20 (64) TESTS 7 77 1024000
227479079 Dechancer D Oct. 10, 2023, 4:27 a.m. OK GNU C++20 (64) TESTS 7 77 1024000
227469914 DerekYeh D Oct. 10, 2023, 2:06 a.m. OK GNU C++20 (64) TESTS 7 78 1024000
227484537 xorzj D Oct. 10, 2023, 5:36 a.m. OK GNU C++20 (64) TESTS 7 78 1024000
227475682 a_yong D Oct. 10, 2023, 3:37 a.m. OK GNU C++20 (64) TESTS 7 78 1024000
227473749 Kidding__Ma D Oct. 10, 2023, 3:11 a.m. OK GNU C++20 (64) TESTS 7 78 1024000
227470775 ococonomy1 D Oct. 10, 2023, 2:22 a.m. OK GNU C++20 (64) TESTS 7 78 1024000
227463311 profchi D Oct. 9, 2023, 11:20 p.m. OK Java 11 TESTS 7 1044 18022400
227472745 Ligh0x74 D Oct. 10, 2023, 2:55 a.m. OK Java 21 TESTS 7 498 0
227433889 puriabhijit000 D Oct. 9, 2023, 5:21 p.m. OK Java 8 TESTS 7 389 0
227424668 hxu10 D Oct. 9, 2023, 4:38 p.m. OK PyPy 3 TESTS 7 904 34201600
227427392 squishybanana04 D Oct. 9, 2023, 4:48 p.m. OK PyPy 3 TESTS 7 1310 18739200
227462231 l0stempl3 D Oct. 9, 2023, 10:45 p.m. OK PyPy 3-64 TESTS 7 514 42393600
227482166 Little_Sheep_Yawn D Oct. 10, 2023, 5:07 a.m. OK PyPy 3-64 TESTS 7 514 47923200
227431390 RobinFromTheHood D Oct. 9, 2023, 5:07 p.m. OK PyPy 3-64 TESTS 7 529 33792000
227448032 ct17 D Oct. 9, 2023, 7:12 p.m. OK PyPy 3-64 TESTS 7 545 79974400
227429447 RobinFromTheHood D Oct. 9, 2023, 4:56 p.m. OK PyPy 3-64 TESTS 7 561 33689600
227422179 SoleProprietor D Oct. 9, 2023, 4:33 p.m. OK PyPy 3-64 TESTS 7 561 50483200
227465019 codicon D Oct. 10, 2023, 12:18 a.m. OK PyPy 3-64 TESTS 7 576 32870400
227474607 jzhe727 D Oct. 10, 2023, 3:23 a.m. OK PyPy 3-64 TESTS 7 607 33382400
227422622 njupt_zy D Oct. 9, 2023, 4:33 p.m. OK PyPy 3-64 TESTS 7 654 44134400
227421887 Sort D Oct. 9, 2023, 4:32 p.m. OK PyPy 3-64 TESTS 7 655 37171200
227431223 Amrish_Yadav D Oct. 9, 2023, 5:06 p.m. OK Ruby 3 TESTS 7 1357 716800

remove filters

Back to search problems