Educational Codeforces Round 166 (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
1976 Educational Codeforces Round 166 (Rated for Div. 2) FINISHED False 7200 20100263 May 30, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1092 ) E Splittable Permutations PROGRAMMING combinatorics data structures dfs and similar greedy math trees

B'Initially, we had one array, which was a permutation of size n (an array of size n where each integer from 1 to n appears exactly once). We performed q operations. During the i -th operation, we did the following: For example, suppose the initial array was [6, 3, 4, 1, 2, 5] , and we performed the following operations: You are given two integers n and q , and two sequences [l_1, l_2, ... , l_q] and [r_1, r_2, ... , r_q] . A permutation of size n is called valid if we can perform q operations and produce the given sequences [l_1, l_2, ... , l_q] and [r_1, r_2, ... , r_q] . Calculate the number of valid permutations. The first line contains two integers n and q ( 1 <= q < n <= 3 cdot 10^5 ). The second line contains q integers l_1, l_2, ... , l_q ( 1 <= l_i <= n ). The third line contains q integers r_1, r_2, ... , r_q ( 1 <= r_i <= n ). Additional constraint on the input: there exists at least one permutation which can produce the given sequences [l_1, l_2, ... , l_q] and [r_1, r_2, ... , r_q] . Print one integer -- the number of valid permutations, taken modulo 998244353 . '...

Tutorials

Educational Codeforces Round 166 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
263601840 og.kostya E June 1, 2024, 8:52 a.m. OK C# 10 TESTS 72 187 23961600
263601192 og.kostya E June 1, 2024, 8:47 a.m. OK C# 10 TESTS 72 233 25292800
263574384 Geeklog E June 1, 2024, 4:43 a.m. OK C++14 (GCC 6-32) TESTS 72 187 5120000
263592727 LDM0116 E June 1, 2024, 7:36 a.m. OK C++14 (GCC 6-32) TESTS 72 202 7270400
263644192 Kent530 E June 1, 2024, 2:43 p.m. OK C++14 (GCC 6-32) TESTS 72 203 7577600
263428678 g1ove E May 31, 2024, 7:23 a.m. OK C++14 (GCC 6-32) TESTS 72 203 18841600
263653573 gwf01 E June 1, 2024, 4:03 p.m. OK C++14 (GCC 6-32) TESTS 72 203 34508800
263555912 g1ove E May 31, 2024, 11:09 p.m. OK C++14 (GCC 6-32) TESTS 72 217 18739200
263393428 dmot E May 30, 2024, 11:43 p.m. OK C++14 (GCC 6-32) TESTS 72 218 4403200
263571615 Southern_Dynasty E June 1, 2024, 4:08 a.m. OK C++14 (GCC 6-32) TESTS 72 374 26726400
263422389 zhenja E May 31, 2024, 6:35 a.m. OK C++14 (GCC 6-32) TESTS 72 389 11264000
263675845 1hoon E June 1, 2024, 7:37 p.m. OK C++14 (GCC 6-32) TESTS 72 546 16998400
263395136 Ryazimn E May 31, 2024, 12:35 a.m. OK C++17 (GCC 7-32) TESTS 72 156 5120000
263531838 granadierfc E May 31, 2024, 5:18 p.m. OK C++17 (GCC 7-32) TESTS 72 171 3584000
263593027 tml27 E June 1, 2024, 7:39 a.m. OK C++17 (GCC 7-32) TESTS 72 171 6348800
263411325 MintCat E May 31, 2024, 4:55 a.m. OK C++17 (GCC 7-32) TESTS 72 171 6758400
263416095 Sparkle_Twilight E May 31, 2024, 5:40 a.m. OK C++17 (GCC 7-32) TESTS 72 171 7168000
263414610 Hritik12 E May 31, 2024, 5:27 a.m. OK C++17 (GCC 7-32) TESTS 72 171 7168000
263434364 wym111 E May 31, 2024, 8:09 a.m. OK C++17 (GCC 7-32) TESTS 72 171 7577600
263413342 anhkha1004 E May 31, 2024, 5:15 a.m. OK C++17 (GCC 7-32) TESTS 72 186 2355200
263397983 __QUT__ E May 31, 2024, 1:47 a.m. OK C++17 (GCC 7-32) TESTS 72 186 4710400
263427451 DeNeRATe E May 31, 2024, 7:14 a.m. OK C++17 (GCC 7-32) TESTS 72 187 4505600
263410350 CLT E May 31, 2024, 4:45 a.m. OK C++20 (GCC 13-64) TESTS 72 92 36454400
263552291 whuang369 E May 31, 2024, 9:36 p.m. OK C++20 (GCC 13-64) TESTS 72 140 4812800
263695263 MIKEFENG E June 2, 2024, 3:30 a.m. OK C++20 (GCC 13-64) TESTS 72 140 6348800
263620591 Retired_Isaunoya E June 1, 2024, 11:22 a.m. OK C++20 (GCC 13-64) TESTS 72 140 6758400
263618284 LNian E June 1, 2024, 11:06 a.m. OK C++20 (GCC 13-64) TESTS 72 140 6758400
263425348 starforces E May 31, 2024, 6:57 a.m. OK C++20 (GCC 13-64) TESTS 72 140 6758400
263626836 huanixel E June 1, 2024, 12:11 p.m. OK C++20 (GCC 13-64) TESTS 72 140 7270400
263414537 CodeChild E May 31, 2024, 5:26 a.m. OK C++20 (GCC 13-64) TESTS 72 140 8294400
263628303 Axire E June 1, 2024, 12:24 p.m. OK C++20 (GCC 13-64) TESTS 72 140 8396800
263673332 amineriwa E June 1, 2024, 7:04 p.m. OK C++20 (GCC 13-64) TESTS 72 140 13619200
263702086 nguyenquocthao00 E June 2, 2024, 5:21 a.m. OK Go TESTS 72 359 183091200
263526814 _wisdom E May 31, 2024, 4:33 p.m. OK Java 21 TESTS 72 437 19148800
263400010 dzhi E May 31, 2024, 2:27 a.m. OK Java 21 TESTS 72 733 37580800
263525451 _wisdom E May 31, 2024, 4:21 p.m. OK Java 21 TESTS 72 1218 19353600
263593911 codeanand17 E June 1, 2024, 7:47 a.m. OK Java 8 TESTS 72 921 4300800
263672383 pierrot E June 1, 2024, 6:53 p.m. OK PyPy 3-64 TESTS 72 436 56217600
263671151 pierrot E June 1, 2024, 6:39 p.m. OK PyPy 3-64 TESTS 72 468 56627200
263672336 pierrot E June 1, 2024, 6:52 p.m. OK PyPy 3-64 TESTS 72 484 56422400
263550871 titia E May 31, 2024, 9:07 p.m. OK PyPy 3-64 TESTS 72 624 85196800
263382303 123gjweq2 E May 30, 2024, 7:48 p.m. OK PyPy 3-64 TESTS 72 656 84889600
263637956 M1ngXu E June 1, 2024, 1:49 p.m. OK Rust 2021 TESTS 72 203 14131200

remove filters

Back to search problems