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 |
---|---|---|---|---|---|---|
1794 | Codeforces Round 856 (Div. 2) | FINISHED | False | 7200 | 59228663 | March 4, 2023, 5:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3683 ) | D | Counting Factorizations | PROGRAMMING | combinatorics dp math number theory |
B'The prime factorization of a positive integer m is the unique way to write it as displaystyle m=p_1^{e_1} cdot p_2^{e_2} cdot ldots cdot p_k^{e_k} , where p_1, p_2, ldots, p_k are prime numbers, p_1 < p_2 < ldots < p_k and e_1, e_2, ldots, e_k are positive integers. For each positive integer m , f(m) is defined as the multiset of all numbers in its prime factorization, that is f(m)= {p_1,e_1,p_2,e_2, ldots,p_k,e_k } . For example, f(24)= {2,3,3,1 } , f(5)= {1,5 } and f(1)= { } . You are given a list consisting of 2n integers a_1, a_2, ldots, a_{2n} . Count how many positive integers m satisfy that f(m)= {a_1, a_2, ldots, a_{2n} } . Since this value may be large, print it modulo 998 ,244 ,353 . The first line contains one integer n ( 1 <= n <= 2022 ). The second line contains 2n integers a_1, a_2, ldots, a_{2n} ( 1 <= a_i <= 10^6 ) -- the given list. Print one integer, the number of positive integers m satisfying f(m)= {a_1, a_2, ldots, a_{2n} } modulo 998 ,244 ,353 . In the first sample, the two values of m such that f(m)= {1,2,3,3 } are m=24 and m=54 . Their prime factorizations are 24=2^3 cdot 3^1 and 54=2^1 cdot 3^3 . In the second sample, the five values of m such that f(m)= {2,2,3,5 } are 200, 225, 288, 500 and 972 . In the third sample, there is no value of m such that f(m)= {1,4 } . Neither 1^4 nor 4^1 are prime factorizations because 1 and 4 are not primes. '... |
Codeforces Round 856 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
196049221 | DmitriyAnikeyev | D | March 4, 2023, 7:14 p.m. | OK | C# 10 | TESTS | 56 | 218 | 6144000 | ||
196060766 | wuhudsm | D | March 4, 2023, 8:25 p.m. | OK | GNU C++14 | TESTS | 56 | 108 | 44032000 | ||
196051305 | Leo_W | D | March 4, 2023, 7:20 p.m. | OK | GNU C++14 | TESTS | 56 | 124 | 32051200 | ||
196043382 | idealover | D | March 4, 2023, 6:56 p.m. | OK | GNU C++14 | TESTS | 56 | 124 | 73830400 | ||
196050569 | usernameson | D | March 4, 2023, 7:18 p.m. | OK | GNU C++14 | TESTS | 56 | 139 | 78848000 | ||
196055077 | KiFaH_HeLaL | D | March 4, 2023, 7:32 p.m. | OK | GNU C++14 | TESTS | 56 | 156 | 147763200 | ||
196043635 | flamestorm | D | March 4, 2023, 6:56 p.m. | OK | GNU C++14 | TESTS | 56 | 171 | 79360000 | ||
196049633 | Sanjay422 | D | March 4, 2023, 7:15 p.m. | OK | GNU C++14 | TESTS | 56 | 187 | 81920000 | ||
196052102 | rfhalb | D | March 4, 2023, 7:23 p.m. | OK | GNU C++14 | TESTS | 56 | 202 | 69120000 | ||
196080417 | Ignotus0 | D | March 5, 2023, 2:56 a.m. | OK | GNU C++14 | TESTS | 56 | 218 | 38707200 | ||
196077856 | omeganot | D | March 5, 2023, 1:56 a.m. | OK | GNU C++14 | TESTS | 56 | 233 | 70246400 |
Back to search problems