Codeforces Round 1060 (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
2154 Codeforces Round 1060 (Div. 2) FINISHED False 7200 15521123 Oct. 19, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 552 ) F1 Bombing (Easy Version) PROGRAMMING combinatorics dp

This is the easy version of the problem. The difference between the versions is that in this version, (n \le 3000). You can hack only if you solved all versions of this problem. A permutation(^{\text{∗}}) (b) is considered a riffle shuffle of a permutation (a) if (|a| = |b|) and there exists (k) where (1 \le k < |a|) such that (a_1,a_2,\ldots,a_k) and (a_{k + 1},a_{k + 2},\ldots,a_{|a|}) are both subsequences(^{\text{†}}) of (b). For example, (\color{red}{1}, \color{blue}{4}, \color{blue}{5}, \color{red}{2}, \color{red}{3}, \color{blue}{6}) is a riffle shuffle of (\color{red}{1}, \color{red}{2}, \color{red}{3}, \color{blue}{4}, \color{blue}{5}, \color{blue}{6}) because we can select (k = 3) and both (\color{red}{1}, \color{red}{2}, \color{red}{3}) and (\color{blue}{4}, \color{blue}{5}, \color{blue}{6}) are subsequences. You are given a permutation (p) of length (n) where some values are replaced with (-1). Determine the number of ways to replace each (-1) with an integer such that (p) becomes a riffle shuffle of (1,2,\ldots,n) (the sorted permutation). The number of ways could be gargantuan, so output it modulo (998\,244\,353). (^{\text{∗}})A permutation of length (n) is an array consisting of (n) distinct integers from (1) to (n) in arbitrary order. For example, (2,3,1,5,4) is a permutation, but (1,2,2) is not a permutation ((2) appears twice in the array), and (1,3,4) is also not a permutation ((n=3) but there is (4) in the array). (^{\text{†}})A sequence (c) is a subsequence of a sequence (d) if (c) can be obtained from (d) by the deletion of several (possibly, zero or all) element from arbitrary positions. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 100)). The description of the test cases follows. The first line

Tutorials

Codeforces Round 1060 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
344750127 Az3ar F1 Oct. 19, 2025, 5:31 p.m. OK C++17 (GCC 7-32) TESTS 36 156 36352000
344759548 -adhd- F1 Oct. 19, 2025, 6:18 p.m. OK C++17 (GCC 7-32) TESTS 36 249 1638400
344787399 fangzx F1 Oct. 20, 2025, 12:11 a.m. OK C++17 (GCC 7-32) TESTS 36 280 102400
344745022 Sudip_Maity F1 Oct. 19, 2025, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 36 312 102400
344768672 Sunglassman F1 Oct. 19, 2025, 7:21 p.m. OK C++17 (GCC 7-32) TESTS 36 343 24064000
344770195 DanielAnker F1 Oct. 19, 2025, 7:33 p.m. OK C++17 (GCC 7-32) TESTS 36 1405 0
344793258 jr_zch F1 Oct. 20, 2025, 2:10 a.m. OK C++20 (GCC 13-64) TESTS 36 77 102400
344792758 jr_zch F1 Oct. 20, 2025, 2:02 a.m. OK C++20 (GCC 13-64) TESTS 36 77 102400
344751743 _runtimeTerror_ F1 Oct. 19, 2025, 5:37 p.m. OK C++20 (GCC 13-64) TESTS 36 77 1228800
344809787 www_bilibili_com F1 Oct. 20, 2025, 5:43 a.m. OK C++20 (GCC 13-64) TESTS 36 77 10137600
344807042 fkcqnk F1 Oct. 20, 2025, 5:17 a.m. OK C++20 (GCC 13-64) TESTS 36 77 37171200
344791785 recollect_ii F1 Oct. 20, 2025, 1:44 a.m. OK C++20 (GCC 13-64) TESTS 36 77 52121600
344799015 nb_jzy F1 Oct. 20, 2025, 3:32 a.m. OK C++20 (GCC 13-64) TESTS 36 78 102400
344796033 jr_zch F1 Oct. 20, 2025, 2:52 a.m. OK C++20 (GCC 13-64) TESTS 36 78 12083200
344766389 RaresPoinaru F1 Oct. 19, 2025, 7:03 p.m. OK C++20 (GCC 13-64) TESTS 36 92 102400
344750643 lmao_ded1309 F1 Oct. 19, 2025, 5:32 p.m. OK C++20 (GCC 13-64) TESTS 36 92 102400
344805299 hungchi17 F1 Oct. 20, 2025, 4:58 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 46 0
344758592 jiangly F1 Oct. 19, 2025, 6:12 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 77 0
344800664 gevenfeng F1 Oct. 20, 2025, 3:56 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 77 102400
344799217 khoand25112007 F1 Oct. 20, 2025, 3:36 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 77 102400
344792245 zhuzc F1 Oct. 20, 2025, 1:52 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 77 102400
344797159 rqlwc F1 Oct. 20, 2025, 3:08 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 77 2457600
344783897 Auchenai01 F1 Oct. 19, 2025, 10:37 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 93 0
344758180 Baraa-Ahmed F1 Oct. 19, 2025, 6:10 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 93 0
344796380 lyh3.14 F1 Oct. 20, 2025, 2:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 36 93 204800
344778876 makcvim F1 Oct. 19, 2025, 9:09 p.m. OK C++23 (GCC 14-64, msys2) TESTS 36 93 28467200
344810260 gardengnome F1 Oct. 20, 2025, 5:48 a.m. OK PyPy 3-64 TESTS 36 249 9420800
344788083 zouyu9631 F1 Oct. 20, 2025, 12:26 a.m. OK PyPy 3-64 TESTS 36 374 8704000
344764335 smz.26 F1 Oct. 19, 2025, 6:48 p.m. OK PyPy 3-64 TESTS 36 1171 17203200

remove filters

Back to search problems