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 |
---|---|---|---|---|---|---|
1654 | Codeforces Round 778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) | FINISHED | False | 8100 | 84047099 | March 20, 2022, 11:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 79 ) | H | Three Minimums | PROGRAMMING | combinatorics fft math | 3500 |
B'Given a list of distinct values, we denote with first minimum, second minimum, and third minimum the three smallest values (in increasing order). A permutation p_1, p_2, ... , p_n is good if the following statement holds for all pairs (l,r) with 1 <= l < l+2 <= r <= n . You are given an integer n and a string s of length m consisting of characters "<" and ">". Count the number of good permutations p_1, p_2, ... , p_n such that, for all 1 <= i <= m , The first line contains two integers n and m ( 2 <= n <= 2 cdot 10^5 , 1 <= q m <= q min(100, n-1) ). The second line contains a string s of length m , consisting of characters "<" and ">". Print a single integer: the number of good permutations satisfying the constraints described in the statement, modulo 998 ,244 ,353 . In the first test, there are 5 good permutations satisfying the constraints given by the string s : [4, 3, 2, 1, 5] , [5, 3, 2, 1, 4] , [5, 4, 2, 1, 3] , [5, 4, 3, 1, 2] , [5, 4, 3, 2, 1] . Each of them In the second test, there are 60 permutations such that p_1 < p_2 . Only 56 of them are good: the permutations [1, 4, 3, 5, 2] , [1, 5, 3, 4, 2] , [2, 4, 3, 5, 1] , [2, 5, 3, 4, 1] are not good because the required condition doesn 't hold for (l, r) = (1, 5) . For example, for the permutation [2, 4, 3, 5, 1] , In the third test, there are 23 good permutations satisfying the constraints given by the string s : [1, 2, 4, 3, 6, 5] , [1, 2, 5, 3, 6, 4] , [1, 2, 6, 3, 5, 4] , [1, 3, 4, 2, 6, 5] , [1, 3, 5, 2, 6, 4] , [1, 3, 6, 2, 5, 4] , [1, 4, 5, 2, 6, 3] , [1, 4, 6, 2, 5, 3] , [1, 5, 6, 2, 4, 3] , [2, 3, 4, 1, 6, 5] , [2, 3, 5, 1, 6, 4] , [2, 3, 6, 1, 5, 4] , [2, 4, 5, 1, 6, 3] , [2, 4, 6, 1, 5, 3] , [2, 5, 6, 1, 4, 3] , [3, 4, 5, '... |
Editorial of Codeforces Round #778 (Div. 1 + Div. 2, based on Technocup 2022 Final Round) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
150278254 | orzdevinwang | H | March 20, 2022, 3:14 p.m. | OK | GNU C++14 | TESTS | 25 | 3961 | 318361600 | 3500 | |
150276315 | Elegia | H | March 20, 2022, 2:57 p.m. | OK | GNU C++17 | TESTS | 25 | 2199 | 190464000 | 3500 | |
150275565 | Martin_nady | H | March 20, 2022, 2:52 p.m. | OK | GNU C++17 | TESTS | 25 | 7737 | 20172800 | 3500 | |
150275514 | PAPIA9A | H | March 20, 2022, 2:52 p.m. | OK | GNU C++17 | TESTS | 25 | 7955 | 20172800 | 3500 | |
150306974 | dario2994 | H | March 20, 2022, 10 p.m. | OK | GNU C++17 (64) | TESTS | 25 | 2043 | 116940800 | 3500 | |
150276173 | greenheadstrange | H | March 20, 2022, 2:56 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 794 | 190976000 | 3500 | |
150322824 | Leeisateam | H | March 21, 2022, 5:24 a.m. | OK | GNU C++20 (64) | TESTS | 25 | 1731 | 113152000 | 3500 | |
150275343 | Qiuly.qwq | H | March 20, 2022, 2:51 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 2168 | 113152000 | 3500 | |
150274882 | jiangly | H | March 20, 2022, 2:49 p.m. | OK | GNU C++20 (64) | TESTS | 25 | 3494 | 18329600 | 3500 |
Back to search problems