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 |
|---|---|---|---|---|---|---|
| 2044 | Codeforces Round 993 (Div. 4) | FINISHED | False | 8100 | 42132323 | Dec. 15, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 5997 ) | F | Easy Demon Problem | PROGRAMMING | binary search brute force math number theory |
For an arbitrary grid, Robot defines its beauty to be the sum of elements in the grid. Robot gives you an array (a) of length (n) and an array (b) of length (m). You construct a (n) by (m) grid (M) such that (M_{i,j}=a_i\cdot b_j) for all (1 \leq i \leq n) and (1 \leq j \leq m). Then, Robot gives you (q) queries, each consisting of a single integer (x). For each query, determine whether or not it is possible to perform the following operation exactly once so that (M) has a beauty of (x): Choose integers (r) and (c) such that (1 \leq r \leq n) and (1 \leq c \leq m) Set (M_{i,j}) to be (0) for all ordered pairs ((i,j)) such that (i=r), (j=c), or both. Note that queries are not persistent , meaning that you do not actually set any elements to (0) in the process — you are only required to output if it is possible to find (r) and (c) such that if the above operation is performed, the beauty of the grid will be (x). Also, note that you must perform the operation for each query, even if the beauty of the original grid is already (x). The first line contains three integers (n), (m), and (q) ((1 \leq n,m \leq 2\cdot 10^5, 1 \leq q \leq 5\cdot 10^4)) — the length of (a), the length of (b), and the number of queries respectively. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((0 \leq |a_i| \leq n)). The third line contains (m) integers (b_1, b_2, \ldots, b_m) ((0 \leq |b_i| \leq m)). The following (q) lines each contain a single integer (x) ((1 \leq |x| \leq 2\cdot 10^5)), the beauty of the grid you wish to achieve by setting all elements in a row and a column to (0). For each testcase, output " YES " (without quotes) if there is a way to perform the aforementioned operation such that the beauty is (x), and " NO " (without quotes) otherwise. You can output " YES " and " NO " |
| Codeforces Round 993 (Div. 4) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 296786936 | ryuuko_ | F | Dec. 16, 2024, 3:49 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 155 | 2764800 | ||
| 296787544 | aqwerty2203 | F | Dec. 16, 2024, 3:59 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 171 | 20992000 | ||
| 296776937 | thudor | F | Dec. 15, 2024, 11:02 p.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 202 | 819200 | ||
| 296758894 | WaterSpellbinder | F | Dec. 15, 2024, 6:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 311 | 0 | ||
| 296758216 | AlRntn | F | Dec. 15, 2024, 6:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 327 | 16998400 | ||
| 296757867 | AlRntn | F | Dec. 15, 2024, 6:12 p.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 343 | 17817600 | ||
| 296785959 | hxano | F | Dec. 16, 2024, 3:31 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 343 | 22630400 | ||
| 296781968 | I_m_on_it | F | Dec. 16, 2024, 2:04 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 358 | 14643200 | ||
| 296751872 | Proofy | F | Dec. 15, 2024, 5:26 p.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 358 | 21299200 | ||
| 296751724 | ender_shayan | F | Dec. 15, 2024, 5:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 358 | 26316800 | ||
| 296792700 | LemonTree_iac | F | Dec. 16, 2024, 5:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 25 | 125 | 2764800 | ||
| 296750513 | akamizane | F | Dec. 15, 2024, 5:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 140 | 2764800 | ||
| 296785026 | yankai | F | Dec. 16, 2024, 3:14 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 140 | 9216000 | ||
| 296784830 | jianyu0922 | F | Dec. 16, 2024, 3:10 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 155 | 4608000 | ||
| 296766825 | ExtractStars | F | Dec. 15, 2024, 7:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 155 | 4608000 | ||
| 296783371 | yxfql | F | Dec. 16, 2024, 2:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 156 | 4915200 | ||
| 296752013 | sai-17 | F | Dec. 15, 2024, 5:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 171 | 0 | ||
| 296758179 | JhoZzel_ | F | Dec. 15, 2024, 6:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 171 | 819200 | ||
| 296778671 | ventusliberum | F | Dec. 16, 2024, 12:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 171 | 4812800 | ||
| 296754432 | Mohmed-gado | F | Dec. 15, 2024, 5:45 p.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 171 | 6451200 | ||
| 296795020 | convective_rain | F | Dec. 16, 2024, 5:44 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 156 | 6451200 | ||
| 296749721 | young_and_dumb | F | Dec. 15, 2024, 5:11 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 171 | 1228800 | ||
| 296795857 | convective_rain | F | Dec. 16, 2024, 5:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 25 | 171 | 6348800 | ||
| 296782320 | zzNcl | F | Dec. 16, 2024, 2:13 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 187 | 18124800 | ||
| 296749383 | yvbf | F | Dec. 15, 2024, 5:09 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 202 | 4505600 | ||
| 296756307 | mohit_here | F | Dec. 15, 2024, 6 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 202 | 10035200 | ||
| 296759338 | Mehul-Raj | F | Dec. 15, 2024, 6:25 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 217 | 102400 | ||
| 296787227 | konb1 | F | Dec. 16, 2024, 3:54 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 217 | 2252800 | ||
| 296783965 | CirnoNine | F | Dec. 16, 2024, 2:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 218 | 6041600 | ||
| 296778483 | pora | F | Dec. 16, 2024, 12:01 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 17 | 218 | 8192000 | ||
| 296750923 | ruban | F | Dec. 15, 2024, 5:19 p.m. | OK | FPC | TESTS | 17 | 546 | 34304000 | ||
| 296790364 | WIND1028 | F | Dec. 16, 2024, 4:44 a.m. | OK | GNU C11 | TESTS | 17 | 1140 | 4096000 | ||
| 296769008 | PlayDate | F | Dec. 15, 2024, 8:18 p.m. | OK | Java 21 | TESTS | 17 | 1077 | 31846400 | ||
| 296762285 | codeWithDarshan | F | Dec. 15, 2024, 6:53 p.m. | OK | Java 21 | TESTS | 17 | 1233 | 38297600 | ||
| 296752992 | man-ray | F | Dec. 15, 2024, 5:34 p.m. | OK | Java 21 | TESTS | 17 | 1296 | 33075200 | ||
| 296755896 | ml_beginner | F | Dec. 15, 2024, 5:56 p.m. | OK | Java 21 | TESTS | 17 | 1546 | 34201600 | ||
| 296771175 | zadafiya610 | F | Dec. 15, 2024, 8:52 p.m. | OK | Java 21 | TESTS | 17 | 1734 | 37068800 | ||
| 296786687 | Dhyanam2005 | F | Dec. 16, 2024, 3:44 a.m. | OK | Java 21 | TESTS | 17 | 1780 | 35225600 | ||
| 296776666 | sajal10 | F | Dec. 15, 2024, 10:53 p.m. | OK | Java 21 | TESTS | 17 | 1827 | 35430400 | ||
| 296755664 | iamalizaidi | F | Dec. 15, 2024, 5:55 p.m. | OK | Java 21 | TESTS | 17 | 1842 | 35020800 | ||
| 296757655 | anay293 | F | Dec. 15, 2024, 6:10 p.m. | OK | Java 21 | TESTS | 17 | 2874 | 127692800 | ||
| 296752963 | CipherSphinx_Raj | F | Dec. 15, 2024, 5:34 p.m. | OK | Java 8 | TESTS | 17 | 889 | 83456000 | ||
| 296745947 | MarcAS | F | Dec. 15, 2024, 4:52 p.m. | OK | Java 8 | TESTS | 17 | 1437 | 117145600 | ||
| 296758453 | seeforty4040 | F | Dec. 15, 2024, 6:17 p.m. | OK | PyPy 3 | TESTS | 17 | 3312 | 35840000 | ||
| 296748245 | liupengsay | F | Dec. 15, 2024, 5:03 p.m. | OK | PyPy 3-64 | TESTS | 17 | 578 | 36864000 | ||
| 296747627 | liupengsay | F | Dec. 15, 2024, 5 p.m. | OK | PyPy 3-64 | TESTS | 17 | 640 | 36556800 | ||
| 296790514 | emparte | F | Dec. 16, 2024, 4:46 a.m. | OK | PyPy 3-64 | TESTS | 17 | 686 | 34918400 | ||
| 296778125 | CRACKA | F | Dec. 15, 2024, 11:48 p.m. | OK | PyPy 3-64 | TESTS | 17 | 811 | 32563200 | ||
| 296769723 | shubham6105 | F | Dec. 15, 2024, 8:28 p.m. | OK | PyPy 3-64 | TESTS | 17 | 828 | 33075200 | ||
| 296751461 | Sandeep_P | F | Dec. 15, 2024, 5:23 p.m. | OK | PyPy 3-64 | TESTS | 17 | 843 | 35328000 | ||
| 296775675 | DeadMan69 | F | Dec. 15, 2024, 10:28 p.m. | OK | PyPy 3-64 | TESTS | 17 | 874 | 39424000 | ||
| 296751411 | Sandeep_P | F | Dec. 15, 2024, 5:22 p.m. | OK | PyPy 3-64 | TESTS | 17 | 905 | 40857600 | ||
| 296776453 | MTA9402 | F | Dec. 15, 2024, 10:47 p.m. | OK | PyPy 3-64 | TESTS | 17 | 1046 | 50585600 | ||
| 296755478 | Deemo_ML | F | Dec. 15, 2024, 5:53 p.m. | OK | PyPy 3-64 | TESTS | 17 | 1202 | 105574400 | ||
| 296773818 | nikgaevoy | F | Dec. 15, 2024, 9:47 p.m. | OK | Rust 2021 | TESTS | 17 | 1187 | 19968000 |
Back to search problems