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 |
---|---|---|---|---|---|---|
1702 | Codeforces Round 805 (Div. 3) | FINISHED | False | 8100 | 79716263 | July 10, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 8585 ) | F | Equate Multisets | PROGRAMMING | constructive algorithms data structures graph matchings greedy math number theory |
B'Multiset --is a set of numbers in which there can be equal elements, and the order of the numbers does not matter. Two multisets are equal when each value occurs the same number of times. For example, the multisets {2,2,4 } and {2,4,2 } are equal, but the multisets {1,2,2 } and {1,1,2 } -- are not. You are given two multisets a and b , each consisting of n integers. In a single operation, any element of the b multiset can be doubled or halved (rounded down). In other words, you have one of the following operations available for an element x of the b multiset: Note that you cannot change the elements of the a multiset. See if you can make the multiset b become equal to the multiset a in an arbitrary number of operations (maybe 0 ). For example, if n = 4 , a = {4, 24, 5, 2 } , b = {4, 1, 6, 11 } , then the answer is yes. We can proceed as follows: The first line of input data contains a single integer t ( 1 <= t <= 10^4 ) --the number of test cases. Each test case consists of three lines. The first line of the test case contains an integer n ( 1 <= n <= 2 cdot 10^5 ) --the number of elements in the multisets a and b . The second line gives n integers: a_1, a_2, ... , a_n ( 1 <= a_1 <= a_2 <= ... <= a_n <= 10^9 ) --the elements of the multiset a . Note that the elements may be equal. The third line contains n integers: b_1, b_2, ... , b_n ( 1 <= b_1 <= b_2 <= ... <= b_n <= 10^9 ) -- elements of the multiset b . Note that the elements may be equal. It is guaranteed that the sum of n values over all test cases does not exceed 2 cdot 10^5 . For each test case, print on a separate line: You can output YES and NO in any case (for example, strings yEs, yes, Yes and YES will be recognized as positive answer). The first example is explained in the '... |
104763 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
163627369 | lamduybao2003 | F | July 11, 2022, 5:47 a.m. | OK | GNU C++14 | TESTS | 38 | 155 | 1638400 | ||
163590884 | c0rncheese | F | July 10, 2022, 6:23 p.m. | OK | GNU C++14 | TESTS | 35 | 171 | 3174400 | ||
163625338 | JoesSR | F | July 11, 2022, 5:24 a.m. | OK | GNU C++14 | TESTS | 38 | 171 | 145920000 | ||
163611652 | Qing_LKYi | F | July 11, 2022, 2 a.m. | OK | GNU C++14 | TESTS | 38 | 187 | 2355200 | ||
163589518 | Yugi.Hacker | F | July 10, 2022, 6:07 p.m. | OK | GNU C++14 | TESTS | 35 | 217 | 4710400 | ||
163624515 | fyzzz | F | July 11, 2022, 5:13 a.m. | OK | GNU C++14 | TESTS | 38 | 218 | 3174400 | ||
163584801 | Logii | F | July 10, 2022, 5:21 p.m. | OK | GNU C++14 | TESTS | 35 | 234 | 3481600 | ||
163585281 | fctee | F | July 10, 2022, 5:25 p.m. | OK | GNU C++14 | TESTS | 35 | 234 | 4198400 | ||
163622404 | pretodf | F | July 11, 2022, 4:44 a.m. | OK | GNU C++14 | TESTS | 38 | 234 | 6451200 | ||
163607755 | CEzi_dong_ji | F | July 11, 2022, 12:43 a.m. | OK | GNU C++14 | TESTS | 38 | 234 | 96153600 | ||
163596615 | bkifhr10 | F | July 10, 2022, 7:48 p.m. | OK | GNU C++17 | TESTS | 35 | 156 | 26419200 | ||
163587606 | anshul.3pathi | F | July 10, 2022, 5:47 p.m. | OK | GNU C++17 | TESTS | 35 | 171 | 6656000 | ||
163585581 | Unstoppable_1 | F | July 10, 2022, 5:28 p.m. | OK | GNU C++17 | TESTS | 35 | 171 | 6656000 | ||
163592313 | gauravray21 | F | July 10, 2022, 6:42 p.m. | OK | GNU C++17 | TESTS | 35 | 171 | 7475200 | ||
163598113 | manku0818 | F | July 10, 2022, 8:15 p.m. | OK | GNU C++17 | TESTS | 35 | 186 | 5836800 | ||
163596747 | Masalmah | F | July 10, 2022, 7:50 p.m. | OK | GNU C++17 | TESTS | 35 | 202 | 2457600 | ||
163586651 | man_of_learning | F | July 10, 2022, 5:38 p.m. | OK | GNU C++17 | TESTS | 35 | 202 | 7270400 | ||
163589009 | coltt | F | July 10, 2022, 6:02 p.m. | OK | GNU C++17 | TESTS | 35 | 202 | 7475200 | ||
163593860 | TrendBattles | F | July 10, 2022, 7:04 p.m. | OK | GNU C++17 | TESTS | 35 | 217 | 3174400 | ||
163602187 | Masalmah | F | July 10, 2022, 9:47 p.m. | OK | GNU C++17 | TESTS | 38 | 217 | 39116800 | ||
163597430 | dgupta0812 | F | July 10, 2022, 8:03 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 5734400 | ||
163592321 | alwyn | F | July 10, 2022, 6:42 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 171 | 9728000 | ||
163584217 | WA_automata | F | July 10, 2022, 5:17 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 186 | 3276800 | ||
163584024 | yaoveil | F | July 10, 2022, 5:15 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 186 | 10547200 | ||
163606425 | cuiaoxiang | F | July 11, 2022, 12:02 a.m. | OK | GNU C++17 (64) | TESTS | 38 | 186 | 11571200 | ||
163596225 | shubhamgrg1000 | F | July 10, 2022, 7:41 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 187 | 9523200 | ||
163600395 | neal | F | July 10, 2022, 9:02 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 187 | 41062400 | ||
163591915 | nohaxjustsoflo | F | July 10, 2022, 6:36 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 202 | 12492800 | ||
163597899 | Milind_Sharma | F | July 10, 2022, 8:12 p.m. | OK | GNU C++17 (64) | TESTS | 35 | 202 | 12902400 | ||
163600375 | neal | F | July 10, 2022, 9:01 p.m. | OK | GNU C++17 (64) | TESTS | 38 | 202 | 53248000 | ||
163612554 | lx_tyin | F | July 11, 2022, 2:16 a.m. | OK | GNU C++20 (64) | TESTS | 38 | 124 | 77721600 | ||
163627860 | Leokkk17 | F | July 11, 2022, 5:52 a.m. | OK | GNU C++20 (64) | TESTS | 38 | 155 | 240640000 | ||
163618304 | fs20091003 | F | July 11, 2022, 3:41 a.m. | OK | GNU C++20 (64) | TESTS | 38 | 156 | 3788800 | ||
163604358 | os2ma | F | July 10, 2022, 10:50 p.m. | OK | GNU C++20 (64) | TESTS | 38 | 156 | 5529600 | ||
163604287 | oxo_01001 | F | July 10, 2022, 10:49 p.m. | OK | GNU C++20 (64) | TESTS | 38 | 156 | 5529600 | ||
163586765 | ssen_56 | F | July 10, 2022, 5:39 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 171 | 7475200 | ||
163586191 | Windy233 | F | July 10, 2022, 5:33 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 171 | 7475200 | ||
163584886 | master._.mind | F | July 10, 2022, 5:22 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 171 | 10547200 | ||
163588313 | eyfmharb | F | July 10, 2022, 5:55 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 171 | 11264000 | ||
163588746 | AS01 | F | July 10, 2022, 5:59 p.m. | OK | GNU C++20 (64) | TESTS | 35 | 187 | 2969600 | ||
163585310 | protogrammer | F | July 10, 2022, 5:25 p.m. | OK | Go | TESTS | 35 | 140 | 22835200 | ||
163591188 | Hasker | F | July 10, 2022, 6:27 p.m. | OK | Haskell | TESTS | 35 | 1326 | 87244800 | ||
163627700 | amitmandal | F | July 11, 2022, 5:50 a.m. | OK | Java 11 | TESTS | 38 | 451 | 17612800 | ||
163616675 | aditya2024 | F | July 11, 2022, 3:18 a.m. | OK | Java 11 | TESTS | 38 | 451 | 19251200 | ||
163621400 | yogii_123 | F | July 11, 2022, 4:30 a.m. | OK | Java 11 | TESTS | 38 | 467 | 17510400 | ||
163596979 | v0s7er | F | July 10, 2022, 7:55 p.m. | OK | Java 11 | TESTS | 35 | 499 | 13312000 | ||
163614837 | Wuya | F | July 11, 2022, 2:52 a.m. | OK | Java 11 | TESTS | 38 | 763 | 16691200 | ||
163602497 | adi_7861 | F | July 10, 2022, 9:55 p.m. | OK | Java 11 | TESTS | 38 | 1528 | 11878400 | ||
163598082 | goyalronak3 | F | July 10, 2022, 8:15 p.m. | OK | Java 11 | TESTS | 35 | 1528 | 39526400 | ||
163599369 | Vipul_Yadav | F | July 10, 2022, 8:39 p.m. | OK | Java 11 | TESTS | 38 | 2292 | 16998400 | ||
163598142 | wat2 | F | July 10, 2022, 8:16 p.m. | OK | Java 11 | TESTS | 35 | 3556 | 260608000 | ||
163593816 | Mother_Father | F | July 10, 2022, 7:03 p.m. | OK | Java 11 | TESTS | 35 | 3977 | 259891200 | ||
163602028 | Mamimi | F | July 10, 2022, 9:44 p.m. | OK | Java 17 | TESTS | 38 | 1201 | 15769600 | ||
163583534 | soumit915 | F | July 10, 2022, 5:12 p.m. | OK | Java 17 | TESTS | 35 | 1544 | 109056000 | ||
163602487 | adi_7861 | F | July 10, 2022, 9:55 p.m. | OK | Java 17 | TESTS | 38 | 1700 | 13926400 | ||
163586282 | anshulchou_123 | F | July 10, 2022, 5:34 p.m. | OK | Java 8 | TESTS | 35 | 436 | 26419200 | ||
163604413 | Sussykin | F | July 10, 2022, 10:52 p.m. | OK | Java 8 | TESTS | 38 | 499 | 23756800 | ||
163587067 | 4mda4mda | F | July 10, 2022, 5:42 p.m. | OK | Java 8 | TESTS | 35 | 1107 | 18636800 | ||
163628133 | kishan963 | F | July 11, 2022, 5:55 a.m. | OK | Java 8 | TESTS | 38 | 1497 | 28876800 | ||
163602511 | adi_7861 | F | July 10, 2022, 9:56 p.m. | OK | Java 8 | TESTS | 38 | 1528 | 9011200 | ||
163602480 | adi_7861 | F | July 10, 2022, 9:55 p.m. | OK | Java 8 | TESTS | 38 | 1591 | 9011200 | ||
163616145 | oneafter | F | July 11, 2022, 3:11 a.m. | OK | Java 8 | TESTS | 38 | 1840 | 22118400 | ||
163585843 | noisegain | F | July 10, 2022, 5:30 p.m. | OK | Kotlin 1.5 | TESTS | 35 | 748 | 26726400 | ||
163585735 | noisegain | F | July 10, 2022, 5:29 p.m. | OK | Kotlin 1.5 | TESTS | 35 | 826 | 26828800 | ||
163586472 | alcogoliki | F | July 10, 2022, 5:36 p.m. | OK | MS C++ 2017 | TESTS | 35 | 546 | 12902400 | ||
163610972 | M_zhi | F | July 11, 2022, 1:49 a.m. | OK | MS C++ 2017 | TESTS | 38 | 576 | 41574400 | ||
163584176 | 2873531385 | F | July 10, 2022, 5:17 p.m. | OK | MS C++ 2017 | TESTS | 35 | 2885 | 104243200 | ||
163595942 | del-user-774348 | F | July 10, 2022, 7:36 p.m. | OK | PyPy 3 | TESTS | 35 | 795 | 27238400 | ||
163585067 | D.V.Aravind | F | July 10, 2022, 5:24 p.m. | OK | PyPy 3-64 | TESTS | 35 | 280 | 34713600 | ||
163593411 | SophieHatter | F | July 10, 2022, 6:58 p.m. | OK | PyPy 3-64 | TESTS | 35 | 296 | 47411200 | ||
163596762 | kuzinow | F | July 10, 2022, 7:51 p.m. | OK | PyPy 3-64 | TESTS | 35 | 514 | 36864000 | ||
163596599 | ronitsingh | F | July 10, 2022, 7:48 p.m. | OK | PyPy 3-64 | TESTS | 35 | 561 | 44339200 | ||
163596797 | ronitsingh | F | July 10, 2022, 7:51 p.m. | OK | PyPy 3-64 | TESTS | 35 | 561 | 45465600 | ||
163604297 | LordOrbit | F | July 10, 2022, 10:49 p.m. | OK | PyPy 3-64 | TESTS | 38 | 592 | 40652800 | ||
163596569 | taiga0629 | F | July 10, 2022, 7:47 p.m. | OK | PyPy 3-64 | TESTS | 35 | 639 | 94003200 | ||
163587244 | KanishkGoel | F | July 10, 2022, 5:44 p.m. | OK | PyPy 3-64 | TESTS | 35 | 732 | 61132800 | ||
163599815 | unknownSolver | F | July 10, 2022, 8:48 p.m. | OK | PyPy 3-64 | TESTS | 38 | 732 | 105984000 | ||
163622433 | shiviDON | F | July 11, 2022, 4:44 a.m. | OK | PyPy 3-64 | TESTS | 38 | 748 | 77107200 | ||
163591281 | bronze_coder | F | July 10, 2022, 6:28 p.m. | OK | Python 3 | TESTS | 35 | 1060 | 22732800 | ||
163594037 | redox_2024 | F | July 10, 2022, 7:06 p.m. | OK | Python 3 | TESTS | 35 | 1107 | 23347200 | ||
163602817 | LordOrbit | F | July 10, 2022, 10:05 p.m. | OK | Python 3 | TESTS | 38 | 1465 | 28876800 | ||
163594280 | anamitra | F | July 10, 2022, 7:10 p.m. | OK | Python 3 | TESTS | 35 | 3712 | 22732800 | ||
163583482 | jakobrs | F | July 10, 2022, 5:12 p.m. | OK | Rust 2021 | TESTS | 35 | 93 | 17100800 | ||
163621373 | Thallium54 | F | July 11, 2022, 4:29 a.m. | OK | Rust 2021 | TESTS | 38 | 311 | 8499200 |
Back to search problems