IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2)

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
2061 IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) FINISHED False 10800 39021923 Jan. 20, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 3938 ) E Kevin and And PROGRAMMING bitmasks brute force dp greedy

Kevin has an integer sequence (a) of length (n). At the same time, Kevin has (m) types of magic, where the (i)-th type of magic can be represented by an integer (b_i). Kevin can perform at most (k) (possibly zero) magic operations. In each operation, Kevin can do the following: Choose two indices (i) ((1\leq i\leq n)) and (j) ((1\leq j\leq m)), and then update (a_i) to (a_i\ \&\ b_j). Here, (\&) denotes the bitwise AND operation . Find the minimum possible sum of all numbers in the sequence (a) after performing at most (k) operations. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains three integers (n, m, k) ((1\leq n \leq 10^5), (1\leq m \leq 10), (0\leq k\leq nm)) — the length of (a), the number of types of magic, and the maximum number of operations. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((0\leq a_i < 2^{30})). The third line contains (m) integers (b_1, b_2, \ldots, b_m) ((0\leq b_i < 2^{30})). It is guaranteed that the sum of (n) over all test cases does not exceed (10^5). For each test case, output one integer — the minimum possible sum of all numbers in the sequence (a) after performing at most (k) operations. In the first test case, one possible way could be: Update (a_1) to (a_1\ \&\ b_1). The sequence will become (5). Update (a_1) to (a_1\ \&\ b_3). The sequence will become (1). In the second test case, one possible way could be: Update (a_1) to (a_1\ \&\ b_3). The sequence will become (1, 6). Update (a_2) to (a_2\ \&\ b_3). The sequence will become (1, 2).

Tutorials

IAEPC Preliminary Contest (Codeforces Round 999, Div. 1 + Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
302117302 ender_shayan E Jan. 20, 2025, 5 p.m. OK C++17 (GCC 7-32) TESTS 26 265 46796800
302149054 Noche_6 E Jan. 20, 2025, 9:27 p.m. OK C++17 (GCC 7-32) TESTS 26 280 7475200
302155525 anmattroi E Jan. 21, 2025, 12:14 a.m. OK C++17 (GCC 7-32) TESTS 26 280 10444800
302170605 XG0000 E Jan. 21, 2025, 4:07 a.m. OK C++17 (GCC 7-32) TESTS 26 281 4915200
302126219 ow3nL E Jan. 20, 2025, 5:27 p.m. OK C++17 (GCC 7-32) TESTS 26 296 4710400
302122406 Thanwisit_neo E Jan. 20, 2025, 5:15 p.m. OK C++17 (GCC 7-32) TESTS 26 342 3379200
302133939 ambak E Jan. 20, 2025, 6:37 p.m. OK C++17 (GCC 7-32) TESTS 26 374 3072000
302124796 antguz E Jan. 20, 2025, 5:22 p.m. OK C++17 (GCC 7-32) TESTS 26 374 4915200
302128952 profound E Jan. 20, 2025, 5:34 p.m. OK C++17 (GCC 7-32) TESTS 26 374 22323200
302126492 che960 E Jan. 20, 2025, 5:28 p.m. OK C++17 (GCC 7-32) TESTS 26 406 5324800
302117885 ahmetalp E Jan. 20, 2025, 5:01 p.m. OK C++20 (GCC 13-64) TESTS 26 249 1536000
302141470 teekaytai E Jan. 20, 2025, 7:41 p.m. OK C++20 (GCC 13-64) TESTS 26 265 716800
302156409 lmx111 E Jan. 21, 2025, 12:30 a.m. OK C++20 (GCC 13-64) TESTS 26 265 167321600
302148800 Negationist E Jan. 20, 2025, 9:22 p.m. OK C++20 (GCC 13-64) TESTS 26 281 4096000
302119818 Vimlendu2003 E Jan. 20, 2025, 5:07 p.m. OK C++20 (GCC 13-64) TESTS 26 281 4710400
302122855 Prasanna28 E Jan. 20, 2025, 5:16 p.m. OK C++20 (GCC 13-64) TESTS 26 281 4812800
302151060 jatro13 E Jan. 20, 2025, 10:10 p.m. OK C++20 (GCC 13-64) TESTS 26 281 4915200
302165648 chenwenmo E Jan. 21, 2025, 3:05 a.m. OK C++20 (GCC 13-64) TESTS 26 281 10854400
302177369 yukihasui439 E Jan. 21, 2025, 5:30 a.m. OK C++20 (GCC 13-64) TESTS 26 281 17920000
302123719 lddlinan E Jan. 20, 2025, 5:19 p.m. OK C++20 (GCC 13-64) TESTS 26 296 4812800
302178595 rubbishZ E Jan. 21, 2025, 5:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 26 203 5529600
302146324 iLoveOru E Jan. 20, 2025, 8:40 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 233 10956800
302128077 MiaoYu404 E Jan. 20, 2025, 5:32 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 234 13619200
302128637 JeffreyArriola E Jan. 20, 2025, 5:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 280 10752000
302177919 mmdrzada E Jan. 21, 2025, 5:36 a.m. OK C++23 (GCC 14-64, msys2) TESTS 26 280 10956800
302146780 Benq E Jan. 20, 2025, 8:47 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 281 3993600
302177306 widsnoy E Jan. 21, 2025, 5:29 a.m. OK C++23 (GCC 14-64, msys2) TESTS 26 281 12492800
302126512 Maxduan E Jan. 20, 2025, 5:28 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 281 64204800
302163972 adi0104 E Jan. 21, 2025, 2:42 a.m. OK C++23 (GCC 14-64, msys2) TESTS 26 311 10854400
302146561 Benq E Jan. 20, 2025, 8:43 p.m. OK C++23 (GCC 14-64, msys2) TESTS 26 312 4300800
302125263 Gassa E Jan. 20, 2025, 5:24 p.m. OK D TESTS 26 905 10956800
302152761 rainboy E Jan. 20, 2025, 10:53 p.m. OK GNU C11 TESTS 26 234 4505600
302122380 Aidp E Jan. 20, 2025, 5:15 p.m. OK GNU C11 TESTS 26 858 43315200
302116715 CodySummers E Jan. 20, 2025, 4:58 p.m. OK GNU C11 TESTS 26 906 16384000
302121214 FrankSimmons E Jan. 20, 2025, 5:11 p.m. OK GNU C11 TESTS 26 999 16896000
302135276 Vinicius_Asaad E Jan. 20, 2025, 6:44 p.m. OK Java 21 TESTS 26 1171 31744000
302126315 kapoor1135790 E Jan. 20, 2025, 5:27 p.m. OK Java 21 TESTS 26 1171 31744000
302123023 ShapXD E Jan. 20, 2025, 5:17 p.m. OK Java 21 TESTS 26 1171 31744000
302121763 abd_nar E Jan. 20, 2025, 5:13 p.m. OK Java 21 TESTS 26 1171 32051200
302119305 vlxx E Jan. 20, 2025, 5:05 p.m. OK Java 21 TESTS 26 1202 31334400
302123487 Jeet_Mukherjee25 E Jan. 20, 2025, 5:18 p.m. OK Java 21 TESTS 26 1202 32256000
302122833 itsamansharma200 E Jan. 20, 2025, 5:16 p.m. OK Java 21 TESTS 26 1217 32665600
302129024 zvwgvx E Jan. 20, 2025, 5:34 p.m. OK Java 21 TESTS 26 1233 32358400
302121144 Priyal_Kumar_ E Jan. 20, 2025, 5:11 p.m. OK Java 21 TESTS 26 1234 32256000
302118217 H098 E Jan. 20, 2025, 5:02 p.m. OK Java 21 TESTS 26 1234 32256000
302126267 digitalman1 E Jan. 20, 2025, 5:27 p.m. OK Java 8 TESTS 26 1218 25804800
302120824 Pebin_Joseph E Jan. 20, 2025, 5:10 p.m. OK Java 8 TESTS 26 1280 25804800
302127535 Nilesh23 E Jan. 20, 2025, 5:31 p.m. OK Java 8 TESTS 26 1640 17100800
302135301 hxu10 E Jan. 20, 2025, 6:45 p.m. OK PyPy 3-64 TESTS 26 999 30924800
302156106 RobinFromTheHood E Jan. 21, 2025, 12:25 a.m. OK PyPy 3-64 TESTS 26 1686 29184000
302145239 AyuAnchor E Jan. 20, 2025, 8:25 p.m. OK PyPy 3-64 TESTS 26 1702 29286400
302116847 harurun4635 E Jan. 20, 2025, 4:59 p.m. OK PyPy 3-64 TESTS 26 1811 109875200
302149250 gardengnome E Jan. 20, 2025, 9:31 p.m. OK PyPy 3-64 TESTS 26 1843 29491200
302149163 gardengnome E Jan. 20, 2025, 9:29 p.m. OK PyPy 3-64 TESTS 26 1890 30105600
302156391 smilences E Jan. 21, 2025, 12:30 a.m. OK PyPy 3-64 TESTS 26 1967 31436800
302155927 RobinFromTheHood E Jan. 21, 2025, 12:21 a.m. OK PyPy 3-64 TESTS 26 1999 29184000
302148667 gardengnome E Jan. 20, 2025, 9:20 p.m. OK PyPy 3-64 TESTS 26 2000 31129600
302119228 MitchellOneal E Jan. 20, 2025, 5:05 p.m. OK Rust 2021 TESTS 26 875 37376000
302136237 ArcAkiZki E Jan. 20, 2025, 6:52 p.m. OK Rust 2021 TESTS 26 921 14745600

remove filters

Back to search problems