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 |
|---|---|---|---|---|---|---|
| 2002 | EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 53018723 | Aug. 11, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1002 ) | F1 | Court Blue (Easy Version) | PROGRAMMING | brute force dfs and similar dp math number theory |
This is the easy version of the problem. In this version, (n=m) and the time limit is lower. You can make hacks only if both versions of the problem are solved. In the court of the Blue King, Lelle and Flamm are having a performance match. The match consists of several rounds. In each round, either Lelle or Flamm wins. Let (W_L) and (W_F) denote the number of wins of Lelle and Flamm, respectively. The Blue King considers a match to be successful if and only if: after every round, (\gcd(W_L,W_F)\le 1); at the end of the match, (W_L\le n, W_F\le m). Note that (\gcd(0,x)=\gcd(x,0)=x) for every non-negative integer (x). Lelle and Flamm can decide to stop the match whenever they want, and the final score of the performance is (l \cdot W_L + f \cdot W_F). Please help Lelle and Flamm coordinate their wins and losses such that the performance is successful , and the total score of the performance is maximized. The first line contains an integer (t) ((1\leq t \leq 10^3)) — the number of test cases. The only line of each test case contains four integers (n), (m), (l), (f) ((2\leq n\leq m \leq 2\cdot 10^7), (1\leq l,f \leq 10^9), (\bf{n=m})): (n), (m) gives the upper bound on the number of Lelle and Flamm's wins, (l) and (f) determine the final score of the performance. Unusual additional constraint : it is guaranteed that, for each test, there are no pairs of test cases with the same pair of (n), (m). For each test case, output a single integer — the maximum total score of a successful performance. In the first test case, a possible performance is as follows: Flamm wins, (\gcd(0,1)=1). Lelle wins, (\gcd(1,1)=1). Flamm wins, (\gcd(1,2)=1). Flamm wins, (\gcd(1,3)=1). Lelle wins, (\gcd(2,3)=1). Lelle and Flamm agree to stop the match. The final score is (2\cdot2+3\cdot5=19). In the third test case, a possible performance is as follows: Flamm wins, $$$\gcd |
| EPIC Institute of Technology Round August 2024 (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 275838759 | 2114992323 | F1 | Aug. 11, 2024, 5:11 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 765 | 160358400 | ||
| 275843673 | Math_rad_round | F1 | Aug. 11, 2024, 5:26 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 781 | 236441600 | ||
| 275841237 | Isoeasy | F1 | Aug. 11, 2024, 5:19 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 984 | 100352000 | ||
| 275889122 | duck_pear | F1 | Aug. 12, 2024, 4:21 a.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 1046 | 36147200 | ||
| 275846988 | knightL | F1 | Aug. 11, 2024, 5:34 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 1140 | 89497600 | ||
| 275839890 | yutabi | F1 | Aug. 11, 2024, 5:14 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 1156 | 20172800 | ||
| 275843046 | by_chance | F1 | Aug. 11, 2024, 5:24 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 1702 | 160358400 | ||
| 275838797 | bro_jie | F1 | Aug. 11, 2024, 5:11 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 1905 | 46080000 | ||
| 275857753 | david_tao | F1 | Aug. 11, 2024, 7:34 p.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 2046 | 100249600 | ||
| 275895156 | sunrise1024 | F1 | Aug. 12, 2024, 5:36 a.m. | OK | C++14 (GCC 6-32) | TESTS | 19 | 2077 | 28979200 | ||
| 275843761 | -0v0- | F1 | Aug. 11, 2024, 5:26 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 312 | 10547200 | ||
| 275880014 | LXH-cat | F1 | Aug. 12, 2024, 2:20 a.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 327 | 40755200 | ||
| 275842532 | The-Winner | F1 | Aug. 11, 2024, 5:23 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 546 | 82739200 | ||
| 275879163 | LXH-cat | F1 | Aug. 12, 2024, 2:09 a.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 592 | 65433600 | ||
| 275839638 | pavement | F1 | Aug. 11, 2024, 5:14 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 671 | 504012800 | ||
| 275845644 | akhilagarwal79 | F1 | Aug. 11, 2024, 5:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 936 | 9011200 | ||
| 275853373 | icewarrior52 | F1 | Aug. 11, 2024, 6:53 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 999 | 24166400 | ||
| 275891382 | jhdonghj112 | F1 | Aug. 12, 2024, 4:50 a.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 999 | 89088000 | ||
| 275836431 | PetelgeuseRomaneeconti | F1 | Aug. 11, 2024, 5:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 1140 | 28262400 | ||
| 275834891 | icefake | F1 | Aug. 11, 2024, 4:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 19 | 1155 | 69324800 | ||
| 275857011 | m7a1g5i8k8a1r4p0 | F1 | Aug. 11, 2024, 7:26 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 124 | 102400 | ||
| 275877881 | EnofTaiPeople | F1 | Aug. 12, 2024, 1:51 a.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 171 | 214118400 | ||
| 275856826 | m7a1g5i8k8a1r4p0 | F1 | Aug. 11, 2024, 7:24 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 203 | 102400 | ||
| 275873210 | hzk_cpp | F1 | Aug. 12, 2024, 12:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 265 | 10547200 | ||
| 275839416 | dl720125 | F1 | Aug. 11, 2024, 5:13 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 265 | 102195200 | ||
| 275839761 | YuukiS | F1 | Aug. 11, 2024, 5:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 280 | 12595200 | ||
| 275843923 | tute7627 | F1 | Aug. 11, 2024, 5:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 311 | 307200 | ||
| 275854328 | KnownError_ | F1 | Aug. 11, 2024, 7 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 327 | 172851200 | ||
| 275878194 | WRKRW | F1 | Aug. 12, 2024, 1:56 a.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 390 | 332185600 | ||
| 275843946 | Sana | F1 | Aug. 11, 2024, 5:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 19 | 437 | 84172800 | ||
| 275841918 | ghj1222 | F1 | Aug. 11, 2024, 5:21 p.m. | OK | GNU C11 | TESTS | 19 | 624 | 37478400 | ||
| 275841042 | VArtem | F1 | Aug. 11, 2024, 5:18 p.m. | OK | Java 21 | TESTS | 19 | 1187 | 20992000 | ||
| 275884174 | 2210030109_hitesh | F1 | Aug. 12, 2024, 3:15 a.m. | OK | Java 21 | TESTS | 19 | 2468 | 66457600 | ||
| 275844359 | profchi | F1 | Aug. 11, 2024, 5:28 p.m. | OK | Java 8 | TESTS | 19 | 2405 | 114585600 | ||
| 275867349 | n685 | F1 | Aug. 11, 2024, 9:57 p.m. | OK | Rust 2021 | TESTS | 19 | 1905 | 16486400 |
Back to search problems