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 |
---|---|---|---|---|---|---|
1679 | Codeforces Round 791 (Div. 2) | FINISHED | False | 7200 | 84659063 | May 14, 2022, 9:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 582 ) | F | Formalism for Formalism | PROGRAMMING | bitmasks dp math |
B"Yura is a mathematician, and his cognition of the world is so absolute as if he have been solving formal problems a hundred of trillions of billions of years. This problem is just that! Consider all non-negative integers from the interval [0, 10^{n}) . For convenience we complement all numbers with leading zeros in such way that each number from the given interval consists of exactly n decimal digits. You are given a set of pairs (u_i, v_i) , where u_i and v_i are distinct decimal digits from 0 to 9 . Consider a number x consisting of n digits. We will enumerate all digits from left to right and denote them as d_1, d_2, ldots, d_n . In one operation you can swap digits d_i and d_{i + 1} if and only if there is a pair (u_j, v_j) in the set such that at least one of the following conditions is satisfied: We will call the numbers x and y , consisting of n digits, equivalent if the number x can be transformed into the number y using some number of operations described above. In particular, every number is considered equivalent to itself. You are given an integer n and a set of m pairs of digits (u_i, v_i) . You have to find the maximum integer k such that there exists a set of integers x_1, x_2, ldots, x_k ( 0 <= x_i < 10^{n} ) such that for each 1 <= i < j <= k the number x_i is not equivalent to the number x_j . The first line contains an integer n ( 1 <= n <= 50 ,000 ) -- the number of digits in considered numbers. The second line contains an integer m ( 0 <= m <= 45 ) -- the number of pairs of digits in the set. Each of the following m lines contains two digits u_i and v_i , separated with a space ( 0 <= u_i < v_i <= 9 ). It's guaranteed that all described pairs are pairwise distinct. Print one integer -- the maximum value k such that there ex"... |
Codeforces Round #791 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
157216407 | leukocyte | F | May 14, 2022, 2:25 p.m. | OK | GNU C++14 | TESTS | 22 | 46 | 0 | ||
157249065 | KrK | F | May 14, 2022, 11:27 p.m. | OK | GNU C++14 | TESTS | 22 | 109 | 1126400 | ||
157250679 | umbrella-leaf | F | May 15, 2022, 12:42 a.m. | OK | GNU C++14 | TESTS | 22 | 139 | 207257600 | ||
157199663 | huangweiliang | F | May 14, 2022, 11:33 a.m. | OK | GNU C++14 | TESTS | 22 | 140 | 205209600 | ||
157217220 | chunjiangchaoshui | F | May 14, 2022, 2:33 p.m. | OK | GNU C++14 | TESTS | 22 | 170 | 205209600 | ||
157206343 | Kaitokid | F | May 14, 2022, 12:51 p.m. | OK | GNU C++14 | TESTS | 22 | 202 | 207667200 | ||
157249768 | hungry1234 | F | May 14, 2022, 11:59 p.m. | OK | GNU C++14 | TESTS | 22 | 202 | 208486400 | ||
157250513 | luogu_bot3 | F | May 15, 2022, 12:35 a.m. | OK | GNU C++14 | TESTS | 22 | 202 | 210739200 | ||
157195920 | zhiyangfan | F | May 14, 2022, 11:24 a.m. | OK | GNU C++14 | TESTS | 22 | 218 | 207257600 | ||
157250176 | zltzlt | F | May 15, 2022, 12:19 a.m. | OK | GNU C++14 | TESTS | 22 | 452 | 1126400 | ||
157255456 | genemator | F | May 15, 2022, 3:29 a.m. | OK | GNU C++17 | TESTS | 22 | 31 | 0 | ||
157257530 | ug1y-b0y | F | May 15, 2022, 4:29 a.m. | OK | GNU C++17 | TESTS | 22 | 155 | 208793600 | ||
157247624 | cmorax | F | May 14, 2022, 10:34 p.m. | OK | GNU C++17 | TESTS | 22 | 155 | 209920000 | ||
157262342 | _Cade_ | F | May 15, 2022, 5:39 a.m. | OK | GNU C++17 | TESTS | 22 | 546 | 1126400 | ||
157263604 | _Cade_ | F | May 15, 2022, 5:56 a.m. | OK | GNU C++17 | TESTS | 22 | 561 | 1126400 | ||
157255329 | xjq | F | May 15, 2022, 3:24 a.m. | OK | GNU C++17 | TESTS | 22 | 592 | 0 | ||
157238144 | Killua_07 | F | May 14, 2022, 6:16 p.m. | OK | GNU C++17 | TESTS | 22 | 920 | 0 | ||
157199138 | NewPC2022 | F | May 14, 2022, 11:32 a.m. | OK | GNU C++17 | TESTS | 22 | 1871 | 228044800 | ||
157230426 | Agreb | F | May 14, 2022, 4:41 p.m. | OK | GNU C++17 | TESTS | 22 | 1872 | 102400 | ||
157204438 | zidder | F | May 14, 2022, 12:41 p.m. | OK | GNU C++17 | TESTS | 22 | 2386 | 209612800 | ||
157227780 | errorgorn | F | May 14, 2022, 4:12 p.m. | OK | GNU C++17 (64) | TESTS | 22 | 15 | 409600 | ||
157251184 | HollwoQ_Pelw | F | May 15, 2022, 1:05 a.m. | OK | GNU C++17 (64) | TESTS | 22 | 62 | 0 | ||
157205504 | zlc1114 | F | May 14, 2022, 12:46 p.m. | OK | GNU C++17 (64) | TESTS | 22 | 155 | 205209600 | ||
157195759 | kotatsugame | F | May 14, 2022, 11:23 a.m. | OK | GNU C++17 (64) | TESTS | 22 | 155 | 205209600 | ||
157230607 | codr0 | F | May 14, 2022, 4:42 p.m. | OK | GNU C++17 (64) | TESTS | 22 | 701 | 206848000 | ||
157228163 | Nutella3000 | F | May 14, 2022, 4:16 p.m. | OK | GNU C++17 (64) | TESTS | 22 | 936 | 0 | ||
157237818 | valerikk | F | May 14, 2022, 6:11 p.m. | OK | GNU C++17 (64) | TESTS | 22 | 982 | 0 | ||
157252706 | ynycoding | F | May 15, 2022, 2:16 a.m. | OK | GNU C++17 (64) | TESTS | 22 | 982 | 205107200 | ||
157208509 | tricyzhkx | F | May 14, 2022, 1:06 p.m. | OK | GNU C++17 (64) | TESTS | 22 | 1840 | 0 |
Back to search problems