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 |
|---|---|---|---|---|---|---|
| 2253 | Educational Codeforces Round 193 (Rated for Div. 2) | FINISHED | False | 7200 | 2647478 | Aug. 7, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 462 ) | F | 4-beauty | PROGRAMMING | bitmasks dp graphs math |
For a set of integers (S), define its divisibility characteristic as the number of ordered pairs ((x, y)) such that (x \ne y), (x) and (y) belong to (S), and (x) is divisible by (y). For a set of integers (A), define its (4)-beauty as follows: consider all sets of four distinct numbers that belong to (A) and form an arithmetic progression; find the maximum divisibility characteristic among all such sets. If there are no suitable sets of four numbers, then the (4)-beauty equals (0). Initially, the set (\{1, 2, \ldots, n\}) is given. You may remove numbers from it. Removing the number (i) costs (m_i) coins. Calculate the minimum number of coins you have to spend in order to decrease the (4)-beauty of the set. The first line contains one integer (n) ((4 \le n \le 5 \cdot 10^5)) — the number of elements in the initial set. The second line contains (n) integers (m_1, m_2, \ldots, m_n) ((1 \le m_i \le 10^9)), where (m_i) is the cost of removing the number (i). Print one integer — the minimum number of coins you have to spend in order to decrease the (4)-beauty of the set. It can be shown that it is always possible. In the first example, the only arithmetic progression of four numbers is (1, 2, 3, 4). Its divisibility characteristic equals (4). It is sufficient to remove the number (4), paying (2) coins. In the second example, it is sufficient to remove the number (1). In the third example, it is optimal to remove the numbers (1) and (6), paying (2+3=5) coins. |
| 155813 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 386147844 | codernight | F | Aug. 7, 2026, 8:06 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 218 | 8601600 | ||
| 386116307 | Shamim_BD | F | Aug. 7, 2026, 3:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 218 | 10444800 | ||
| 386127122 | l4rbix | F | Aug. 7, 2026, 4:31 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 265 | 10752000 | ||
| 386121759 | Antiphilia | F | Aug. 7, 2026, 4:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 281 | 39833600 | ||
| 386152941 | myfather2211 | F | Aug. 7, 2026, 9:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 296 | 10649600 | ||
| 386127607 | tin-tin | F | Aug. 7, 2026, 4:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 312 | 10649600 | ||
| 386129690 | SyntaxGambit | F | Aug. 7, 2026, 4:40 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 359 | 10752000 | ||
| 386125159 | veteran_hawk | F | Aug. 7, 2026, 4:26 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 390 | 14950400 | ||
| 386127972 | BTinn | F | Aug. 7, 2026, 4:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 421 | 11059200 | ||
| 386128609 | mirza5678 | F | Aug. 7, 2026, 4:34 p.m. | OK | C++17 (GCC 7-32) | TESTS | 49 | 453 | 12697600 | ||
| 386136985 | tswatery2 | F | Aug. 7, 2026, 5:49 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 171 | 14540800 | ||
| 386137292 | guesttttter | F | Aug. 7, 2026, 5:52 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 187 | 12492800 | ||
| 386163475 | masy2011 | F | Aug. 8, 2026, 3:15 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 203 | 16998400 | ||
| 386159384 | -Ling_xi- | F | Aug. 8, 2026, 1:34 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 203 | 77004800 | ||
| 386159534 | -Ling_xi- | F | Aug. 8, 2026, 1:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 218 | 15257600 | ||
| 386122255 | iloveMT | F | Aug. 7, 2026, 4:17 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 234 | 46080000 | ||
| 386134259 | 0t0infinity | F | Aug. 7, 2026, 5:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 250 | 16179200 | ||
| 386159267 | -Ling_xi- | F | Aug. 8, 2026, 1:30 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 250 | 79052800 | ||
| 386167518 | yxl1 | F | Aug. 8, 2026, 4:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 265 | 16896000 | ||
| 386130034 | Dark__Seith | F | Aug. 7, 2026, 4:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 281 | 5427200 | ||
| 386130486 | P2441M | F | Aug. 7, 2026, 4:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 156 | 8806400 | ||
| 386125712 | SilverWolfLV.999 | F | Aug. 7, 2026, 4:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 171 | 8704000 | ||
| 386153493 | slcpp | F | Aug. 7, 2026, 9:59 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 171 | 10854400 | ||
| 386153527 | slcpp | F | Aug. 7, 2026, 9:59 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 187 | 8704000 | ||
| 386116750 | WildPeach.cn | F | Aug. 7, 2026, 4 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 187 | 8704000 | ||
| 386114670 | tarachandjakhar | F | Aug. 7, 2026, 3:54 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 187 | 12902400 | ||
| 386111719 | gzyo4 | F | Aug. 7, 2026, 3:45 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 203 | 8704000 | ||
| 386125464 | ji2duan | F | Aug. 7, 2026, 4:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 203 | 15052800 | ||
| 386117875 | rehaan.ahmad | F | Aug. 7, 2026, 4:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 203 | 19353600 | ||
| 386126957 | iphone1401120 | F | Aug. 7, 2026, 4:31 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 49 | 218 | 10854400 | ||
| 386129714 | Maanik_C | F | Aug. 7, 2026, 4:40 p.m. | OK | GNU C11 | TESTS | 49 | 171 | 16793600 | ||
| 386144034 | gaurinandwana | F | Aug. 7, 2026, 7:09 p.m. | OK | Java 21 | TESTS | 49 | 343 | 25190400 | ||
| 386122305 | MdKhanBahadurSadi | F | Aug. 7, 2026, 4:17 p.m. | OK | Java 21 | TESTS | 49 | 578 | 14643200 | ||
| 386128209 | iamsvinayak | F | Aug. 7, 2026, 4:33 p.m. | OK | Java 21 | TESTS | 49 | 656 | 19763200 | ||
| 386123084 | barbaRian. | F | Aug. 7, 2026, 4:20 p.m. | OK | Java 21 | TESTS | 49 | 859 | 19456000 | ||
| 386128254 | Saurabht358 | F | Aug. 7, 2026, 4:34 p.m. | OK | Java 21 | TESTS | 49 | 1281 | 16281600 | ||
| 386134127 | amardeep923bth | F | Aug. 7, 2026, 5:19 p.m. | OK | Java 21 | TESTS | 49 | 1687 | 95539200 | ||
| 386128402 | omm775 | F | Aug. 7, 2026, 4:34 p.m. | OK | Java 8 | TESTS | 49 | 203 | 11673600 | ||
| 386117171 | simranchaprana77 | F | Aug. 7, 2026, 4:01 p.m. | OK | Java 8 | TESTS | 49 | 562 | 42393600 | ||
| 386124517 | SavriJoshi | F | Aug. 7, 2026, 4:24 p.m. | OK | Java 8 | TESTS | 49 | 4703 | 31539200 | ||
| 386160786 | ramumali2002 | F | Aug. 8, 2026, 2:13 a.m. | OK | PyPy 3 | TESTS | 49 | 3406 | 121036800 | ||
| 386128019 | dparth_7 | F | Aug. 7, 2026, 4:33 p.m. | OK | PyPy 3-64 | TESTS | 49 | 796 | 60928000 | ||
| 386123780 | jjjoshgoal | F | Aug. 7, 2026, 4:22 p.m. | OK | PyPy 3-64 | TESTS | 49 | 906 | 74240000 | ||
| 386113763 | chhillarankit74 | F | Aug. 7, 2026, 3:51 p.m. | OK | PyPy 3-64 | TESTS | 49 | 2078 | 70758400 | ||
| 386127471 | iluvcats | F | Aug. 7, 2026, 4:32 p.m. | OK | Python 2 | TESTS | 49 | 3765 | 42905600 | ||
| 386165461 | gauriphatate00 | F | Aug. 8, 2026, 3:53 a.m. | OK | Python 3 | TESTS | 49 | 2671 | 64819200 | ||
| 386128536 | d11maan | F | Aug. 7, 2026, 4:34 p.m. | OK | Rust 2024 | TESTS | 49 | 125 | 17920000 | ||
| 386119148 | sansen | F | Aug. 7, 2026, 4:07 p.m. | OK | Rust 2024 | TESTS | 49 | 781 | 26214400 |
Back to search problems