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 |
---|---|---|---|---|---|---|
1605 | Codeforces Round 754 (Div. 2) | FINISHED | False | 7200 | 100538663 | Nov. 12, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 314 ) | F | PalindORme | PROGRAMMING | combinatorics dp | 2900 |
B'An integer array a of length n is said to be a PalindORme if ( a_{1} | a_{2} | ldots | a_{i}) = (a_{{n - i + 1}} | ldots | a_{{n - 1}} | a_{n}) for all 1 <= q i <= q n , where | denotes the bitwise OR operation. An integer array a of length n is considered to be good if its elements can be rearranged to form a PalindORme. Formally, array a is good if there exists a permutation p_1, p_2, ldots p_n (an array where each integer from 1 to n appears exactly once) for which a_{p_1}, a_{p_2}, ldots a_{p_n} is a PalindORme. Find the number of good arrays of length n , consisting only of integers in the range [0, 2^{k} - 1] , and print it modulo some prime m . Two arrays a_1, a_2, ldots, a_n and b_1, b_2, ldots, b_n are considered to be different if there exists any i (1 <= q i <= q n) such that a_i ne b_i . The first and only line of the input contains three integers n , k and m ( 1 <= q n,k <= q 80 , 10^8 lt m lt 10^9 ). It is guaranteed that m is prime. Print a single integer -- the number of good arrays modulo m . In the first sample, both the possible arrays [0] and [1] are good. In the second sample, some examples of good arrays are: Note that [1, 1, 0] , [1, 0, 1] and [0, 1, 1] are all good arrays and are considered to be different according to the definition in the statement. In the third sample, an example of a good array is [1, 0, 1, 4, 2, 5, 4] . It can be rearranged to an array b = [1, 5, 0, 2, 4, 4, 1] which is a PalindORme because: Here mathrm{OR}(l, r) denotes b_{l} | b_{l+1} | ldots | b_{r} '... |
tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
135196724 | rainboy | F | Nov. 12, 2021, 9:17 p.m. | OK | GNU C11 | TESTS | 80 | 1434 | 3891200 | 2900 | |
135205356 | abcde1202 | F | Nov. 13, 2021, 1:32 a.m. | OK | GNU C11 | TESTS | 80 | 1466 | 3891200 | 2900 | |
135192037 | sofikakolina | F | Nov. 12, 2021, 7:56 p.m. | OK | GNU C++14 | TESTS | 80 | 936 | 1740800 | 2900 | |
135210464 | Zhuo_Miao | F | Nov. 13, 2021, 3:14 a.m. | OK | GNU C++17 | TESTS | 80 | 452 | 1228800 | 2900 | |
135184131 | higherorbit | F | Nov. 12, 2021, 6:22 p.m. | OK | GNU C++17 | TESTS | 80 | 967 | 1740800 | 2900 | |
135191996 | sofikakolina | F | Nov. 12, 2021, 7:55 p.m. | OK | GNU C++17 | TESTS | 80 | 967 | 1740800 | 2900 | |
135184873 | Krolo7 | F | Nov. 12, 2021, 6:29 p.m. | OK | GNU C++17 | TESTS | 80 | 967 | 1740800 | 2900 | |
135196746 | rainboy | F | Nov. 12, 2021, 9:17 p.m. | OK | GNU C++17 | TESTS | 80 | 1372 | 1228800 | 2900 | |
135211707 | Newbie_Rainbow_sjy | F | Nov. 13, 2021, 3:38 a.m. | OK | GNU C++17 (64) | TESTS | 80 | 202 | 1331200 | 2900 | |
135178553 | dashing_ | F | Nov. 12, 2021, 5:36 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 483 | 1638400 | 2900 | |
135178381 | dashing_ | F | Nov. 12, 2021, 5:35 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 483 | 1638400 | 2900 | |
135208664 | Alan233 | F | Nov. 13, 2021, 2:43 a.m. | OK | GNU C++17 (64) | TESTS | 80 | 561 | 1331200 | 2900 | |
135192112 | sofikakolina | F | Nov. 12, 2021, 7:57 p.m. | OK | GNU C++17 (64) | TESTS | 80 | 1076 | 1536000 | 2900 | |
135185794 | maspy | F | Nov. 12, 2021, 6:38 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 421 | 1433600 | 2900 | |
135175668 | maspy | F | Nov. 12, 2021, 5:15 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 467 | 1740800 | 2900 | |
135192005 | sofikakolina | F | Nov. 12, 2021, 7:55 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 1060 | 1638400 | 2900 | |
135196737 | rainboy | F | Nov. 12, 2021, 9:17 p.m. | OK | GNU C++20 (64) | TESTS | 80 | 1560 | 1331200 | 2900 | |
135212829 | Koo_Pung-Kei | F | Nov. 13, 2021, 3:57 a.m. | OK | Kotlin 1.5 | TESTS | 80 | 1824 | 25702400 | 2900 |
Back to search problems