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 |
---|---|---|---|---|---|---|
1696 | Codeforces Global Round 21 | FINISHED | False | 8100 | 81012263 | June 25, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 11854 ) | C | Fishingprince Plays With Array | PROGRAMMING | constructive algorithms greedy implementation |
B'Fishingprince is playing with an array [a_1,a_2, ... ,a_n] . He also has a magic number m . He can do the following two operations on it: Note that the array length might change during the process. The value of n above is defined as the current length of the array (might differ from the n in the input). Fishingprince has another array [b_1,b_2, ... ,b_k] . Please determine if he can turn a into b using any number (possibly zero) of operations. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). Description of the test cases follows. The first line of each test case contains two integers n and m ( 1 <= n <= 5 cdot 10^4 , 2 <= m <= 10^9 ). The second line of each test case contains n integers a_1,a_2, ldots,a_n ( 1 <= a_i <= 10^9 ). The third line of each test case contains one integer k ( 1 <= k <= 5 cdot 10^4 ). The fourth line of each test case contains k integers b_1,b_2, ldots,b_k ( 1 <= b_i <= 10^9 ). It is guaranteed that the sum of n+k over all test cases does not exceed 2 cdot 10^5 . For each testcase, print Yes if it is possible to turn a into b , and No otherwise. You can print each letter in any case (upper or lower). In the first test case of the sample, we can do the second operation with i=2 : [1, color{red}{2,2},4,2] to [1, color{red}{4},4,2] . In the second testcase of the sample, we can: '... |
Editorial of Codeforces Global Round 21 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
161820680 | Cyanine_1 | C | June 26, 2022, 1:05 a.m. | OK | Clang++17 Diagnostics | TESTS | 27 | 982 | 305971200 | ||
161820645 | Cyanine_1 | C | June 26, 2022, 1:04 a.m. | OK | Clang++17 Diagnostics | TESTS | 27 | 1029 | 305971200 | ||
161806365 | tgehr | C | June 25, 2022, 6:43 p.m. | OK | D | TESTS | 27 | 156 | 16998400 | ||
161806248 | tgehr | C | June 25, 2022, 6:41 p.m. | OK | D | TESTS | 27 | 171 | 16998400 | ||
161787506 | NenadDapic | C | June 25, 2022, 4:15 p.m. | OK | FPC | TESTS | 26 | 77 | 2662400 | ||
161830582 | gxlois | C | June 26, 2022, 5:30 a.m. | OK | GNU C11 | TESTS | 27 | 61 | 5324800 | ||
161791410 | aerobe | C | June 25, 2022, 4:30 p.m. | OK | GNU C++14 | TESTS | 26 | 61 | 1433600 | ||
161790054 | closed_doors | C | June 25, 2022, 4:24 p.m. | OK | GNU C++14 | TESTS | 26 | 61 | 2662400 | ||
161794809 | Sean6 | C | June 25, 2022, 4:43 p.m. | OK | GNU C++14 | TESTS | 26 | 61 | 2969600 | ||
161789944 | sicupu | C | June 25, 2022, 4:24 p.m. | OK | GNU C++14 | TESTS | 26 | 61 | 4915200 | ||
161820930 | leukocyte | C | June 26, 2022, 1:13 a.m. | OK | GNU C++14 | TESTS | 27 | 62 | 1843200 | ||
161819098 | Iamlgs | C | June 25, 2022, 11:57 p.m. | OK | GNU C++14 | TESTS | 27 | 62 | 1843200 | ||
161825700 | CoderChacha | C | June 26, 2022, 3:37 a.m. | OK | GNU C++14 | TESTS | 27 | 62 | 1843200 | ||
161825522 | arpit_08 | C | June 26, 2022, 3:33 a.m. | OK | GNU C++14 | TESTS | 27 | 62 | 1945600 | ||
161825111 | pranshu_45 | C | June 26, 2022, 3:22 a.m. | OK | GNU C++14 | TESTS | 27 | 62 | 2048000 | ||
161812844 | saudjafar | C | June 25, 2022, 8:35 p.m. | OK | GNU C++14 | TESTS | 27 | 62 | 2252800 | ||
161810931 | krijgertje | C | June 25, 2022, 7:56 p.m. | OK | GNU C++17 | TESTS | 27 | 46 | 1433600 | ||
161795627 | user256 | C | June 25, 2022, 4:45 p.m. | OK | GNU C++17 | TESTS | 26 | 61 | 1433600 | ||
161802406 | SubhajeetLahiri | C | June 25, 2022, 5:57 p.m. | OK | GNU C++17 | TESTS | 27 | 61 | 1740800 | ||
161793675 | crazyzhk | C | June 25, 2022, 4:38 p.m. | OK | GNU C++17 | TESTS | 26 | 61 | 2048000 | ||
161831084 | 007kartik | C | June 26, 2022, 5:39 a.m. | OK | GNU C++17 | TESTS | 27 | 61 | 2764800 | ||
161787926 | zenith82114 | C | June 25, 2022, 4:17 p.m. | OK | GNU C++17 | TESTS | 26 | 62 | 1433600 | ||
161792467 | LihuaCF | C | June 25, 2022, 4:34 p.m. | OK | GNU C++17 | TESTS | 26 | 62 | 1433600 | ||
161830411 | abh1_sh3k | C | June 26, 2022, 5:27 a.m. | OK | GNU C++17 | TESTS | 27 | 62 | 1843200 | ||
161828703 | JAINISHx | C | June 26, 2022, 4:52 a.m. | OK | GNU C++17 | TESTS | 27 | 62 | 1843200 | ||
161821290 | HHU_fl | C | June 26, 2022, 1:28 a.m. | OK | GNU C++17 | TESTS | 27 | 62 | 1843200 | ||
161822118 | zzy0929 | C | June 26, 2022, 1:56 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 31 | 3891200 | ||
161794396 | divyansh_sahu | C | June 25, 2022, 4:41 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 46 | 2048000 | ||
161824032 | Lost_In_Life | C | June 26, 2022, 2:54 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 46 | 3174400 | ||
161822518 | kkcom | C | June 26, 2022, 2:09 a.m. | OK | GNU C++17 (64) | TESTS | 27 | 46 | 4403200 | ||
161800930 | zitraks | C | June 25, 2022, 5:44 p.m. | OK | GNU C++17 (64) | TESTS | 26 | 46 | 4403200 | ||
161810661 | liyh | C | June 25, 2022, 7:51 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 46 | 4608000 | ||
161813839 | hustler_123 | C | June 25, 2022, 8:58 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 46 | 4812800 | ||
161813597 | neal | C | June 25, 2022, 8:51 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 46 | 4812800 | ||
161808638 | Amank2854 | C | June 25, 2022, 7:16 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 46 | 4812800 | ||
161814540 | neo_37 | C | June 25, 2022, 9:16 p.m. | OK | GNU C++17 (64) | TESTS | 27 | 46 | 4812800 | ||
161797106 | OnePunchMan1 | C | June 25, 2022, 4:49 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 31 | 2048000 | ||
161823417 | iThunderGod | C | June 26, 2022, 2:35 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 31 | 2048000 | ||
161806600 | QusaiHroub | C | June 25, 2022, 6:46 p.m. | OK | GNU C++20 (64) | TESTS | 27 | 31 | 2150400 | ||
161791254 | cloud_007 | C | June 25, 2022, 4:29 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 31 | 2252800 | ||
161793795 | sgly33 | C | June 25, 2022, 4:39 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 31 | 2867200 | ||
161796176 | i_emerge16 | C | June 25, 2022, 4:47 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 31 | 2867200 | ||
161832303 | frostylight | C | June 26, 2022, 6 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 31 | 3072000 | ||
161826033 | JSimonsHedge | C | June 26, 2022, 3:46 a.m. | OK | GNU C++20 (64) | TESTS | 27 | 31 | 3276800 | ||
161787755 | Ayham_Dabah | C | June 25, 2022, 4:16 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 31 | 3276800 | ||
161792564 | Rinors | C | June 25, 2022, 4:34 p.m. | OK | GNU C++20 (64) | TESTS | 26 | 31 | 3788800 | ||
161819893 | moh.amr | C | June 26, 2022, 12:33 a.m. | OK | Go | TESTS | 27 | 140 | 9216000 | ||
161819738 | moh.amr | C | June 26, 2022, 12:25 a.m. | OK | Go | TESTS | 27 | 155 | 9216000 | ||
161795819 | rdamir86 | C | June 25, 2022, 4:46 p.m. | OK | Go | TESTS | 26 | 171 | 11264000 | ||
161811641 | koqo | C | June 25, 2022, 8:10 p.m. | OK | Go | TESTS | 27 | 186 | 9011200 | ||
161799514 | rdamir86 | C | June 25, 2022, 5:36 p.m. | OK | Go | TESTS | 26 | 186 | 11468800 | ||
161824649 | iamavalon | C | June 26, 2022, 3:10 a.m. | OK | Java 11 | TESTS | 27 | 187 | 25600000 | ||
161800097 | shojin_pro | C | June 25, 2022, 5:39 p.m. | OK | Java 11 | TESTS | 26 | 202 | 25190400 | ||
161796719 | dunkingdonuts | C | June 25, 2022, 4:49 p.m. | OK | Java 11 | TESTS | 26 | 217 | 25190400 | ||
161820748 | jiomart | C | June 26, 2022, 1:07 a.m. | OK | Java 11 | TESTS | 27 | 233 | 25292800 | ||
161825144 | aditya2024 | C | June 26, 2022, 3:23 a.m. | OK | Java 11 | TESTS | 27 | 249 | 25702400 | ||
161801383 | Aaryendra | C | June 25, 2022, 5:48 p.m. | OK | Java 11 | TESTS | 26 | 249 | 25804800 | ||
161813591 | themadknight45 | C | June 25, 2022, 8:51 p.m. | OK | Java 11 | TESTS | 27 | 249 | 26214400 | ||
161813535 | dark_rays | C | June 25, 2022, 8:50 p.m. | OK | Java 11 | TESTS | 27 | 249 | 26214400 | ||
161803233 | tusharpruth | C | June 25, 2022, 6:06 p.m. | OK | Java 11 | TESTS | 27 | 249 | 26521600 | ||
161826634 | Harshwardhan_Yadav | C | June 26, 2022, 4:03 a.m. | OK | Java 11 | TESTS | 27 | 265 | 26726400 | ||
161830615 | iamsoumik | C | June 26, 2022, 5:31 a.m. | OK | Java 17 | TESTS | 27 | 342 | 41779200 | ||
161829370 | chinmaya21 | C | June 26, 2022, 5:06 a.m. | OK | Java 8 | TESTS | 27 | 140 | 20172800 | ||
161800193 | NoobAk | C | June 25, 2022, 5:39 p.m. | OK | Java 8 | TESTS | 26 | 155 | 20377600 | ||
161791951 | Omar_Mohammad | C | June 25, 2022, 4:32 p.m. | OK | Java 8 | TESTS | 26 | 156 | 20684800 | ||
161811076 | leonlian | C | June 25, 2022, 7:59 p.m. | OK | Java 8 | TESTS | 27 | 171 | 20787200 | ||
161792143 | 1-1-1 | C | June 25, 2022, 4:32 p.m. | OK | Java 8 | TESTS | 26 | 171 | 20787200 | ||
161791377 | faild-in-2021 | C | June 25, 2022, 4:30 p.m. | OK | Java 8 | TESTS | 26 | 187 | 20684800 | ||
161787156 | Swapniltri | C | June 25, 2022, 4:14 p.m. | OK | Java 8 | TESTS | 26 | 187 | 20992000 | ||
161808981 | O_E | C | June 25, 2022, 7:21 p.m. | OK | Java 8 | TESTS | 27 | 187 | 21401600 | ||
161789420 | Termii | C | June 25, 2022, 4:22 p.m. | OK | Java 8 | TESTS | 26 | 202 | 20480000 | ||
161812608 | pl728 | C | June 25, 2022, 8:30 p.m. | OK | Java 8 | TESTS | 27 | 202 | 20787200 | ||
161811287 | SlavaG | C | June 25, 2022, 8:03 p.m. | OK | Kotlin 1.6 | TESTS | 27 | 358 | 27238400 | ||
161808868 | bhawani0910 | C | June 25, 2022, 7:20 p.m. | OK | Kotlin 1.6 | TESTS | 27 | 405 | 28979200 | ||
161830761 | touxinzei | C | June 26, 2022, 5:34 a.m. | OK | MS C++ 2017 | TESTS | 27 | 62 | 2355200 | ||
161800782 | canonica1 | C | June 25, 2022, 5:43 p.m. | OK | MS C++ 2017 | TESTS | 26 | 171 | 5324800 | ||
161805499 | Cubgl | C | June 25, 2022, 6:31 p.m. | OK | MS C++ 2017 | TESTS | 27 | 202 | 3276800 | ||
161804173 | kevskillz | C | June 25, 2022, 6:16 p.m. | OK | MS C++ 2017 | TESTS | 27 | 217 | 5836800 | ||
161795919 | AM_coder | C | June 25, 2022, 4:46 p.m. | OK | PascalABC.NET | TESTS | 26 | 592 | 32972800 | ||
161788739 | 9.86960440109 | C | June 25, 2022, 4:20 p.m. | OK | PyPy 3 | TESTS | 26 | 420 | 35123200 | ||
161803402 | shivambhagat02 | C | June 25, 2022, 6:08 p.m. | OK | PyPy 3 | TESTS | 27 | 654 | 37785600 | ||
161794356 | DoggoKing | C | June 25, 2022, 4:41 p.m. | OK | PyPy 3 | TESTS | 26 | 842 | 38912000 | ||
161800817 | pxhdg | C | June 25, 2022, 5:43 p.m. | OK | PyPy 3-64 | TESTS | 26 | 187 | 57753600 | ||
161787455 | s_prateek26 | C | June 25, 2022, 4:15 p.m. | OK | PyPy 3-64 | TESTS | 26 | 218 | 48128000 | ||
161803429 | raushnn | C | June 25, 2022, 6:08 p.m. | OK | PyPy 3-64 | TESTS | 27 | 234 | 56320000 | ||
161801741 | Juanm1 | C | June 25, 2022, 5:51 p.m. | OK | PyPy 3-64 | TESTS | 26 | 249 | 58368000 | ||
161813004 | Mustela_Erminea | C | June 25, 2022, 8:38 p.m. | OK | PyPy 3-64 | TESTS | 27 | 280 | 48332800 | ||
161814244 | TheViking733n | C | June 25, 2022, 9:08 p.m. | OK | PyPy 3-64 | TESTS | 27 | 295 | 55500800 | ||
161799452 | sarthak2308 | C | June 25, 2022, 5:36 p.m. | OK | PyPy 3-64 | TESTS | 26 | 295 | 57753600 | ||
161811306 | ronitsingh | C | June 25, 2022, 8:03 p.m. | OK | PyPy 3-64 | TESTS | 27 | 296 | 57856000 | ||
161813110 | Mustela_Erminea | C | June 25, 2022, 8:40 p.m. | OK | PyPy 3-64 | TESTS | 27 | 311 | 48230400 | ||
161825570 | D.V.Aravind | C | June 26, 2022, 3:34 a.m. | OK | PyPy 3-64 | TESTS | 27 | 311 | 49561600 | ||
161790492 | Player001 | C | June 25, 2022, 4:26 p.m. | OK | Python 3 | TESTS | 26 | 374 | 10854400 | ||
161789572 | sandesh32 | C | June 25, 2022, 4:23 p.m. | OK | Python 3 | TESTS | 26 | 390 | 12185600 | ||
161796759 | fighting_wang | C | June 25, 2022, 4:49 p.m. | OK | Python 3 | TESTS | 26 | 421 | 13414400 | ||
161794320 | yujt123 | C | June 25, 2022, 4:41 p.m. | OK | Python 3 | TESTS | 26 | 421 | 13414400 | ||
161802258 | Volifter | C | June 25, 2022, 5:56 p.m. | OK | Python 3 | TESTS | 27 | 436 | 12185600 | ||
161805152 | MohaSa | C | June 25, 2022, 6:27 p.m. | OK | Python 3 | TESTS | 27 | 467 | 15257600 | ||
161805962 | pennymagic156 | C | June 25, 2022, 6:37 p.m. | OK | Python 3 | TESTS | 27 | 514 | 11980800 | ||
161821373 | VioletVal | C | June 26, 2022, 1:31 a.m. | OK | Python 3 | TESTS | 27 | 530 | 15052800 | ||
161787720 | shokal_kishan | C | June 25, 2022, 4:16 p.m. | OK | Python 3 | TESTS | 26 | 576 | 16076800 | ||
161799494 | MrDrogon | C | June 25, 2022, 5:36 p.m. | OK | Python 3 | TESTS | 26 | 592 | 17920000 | ||
161807733 | kokkuri | C | June 25, 2022, 7:02 p.m. | OK | Ruby 3 | TESTS | 27 | 452 | 64204800 | ||
161805289 | Thallium54 | C | June 25, 2022, 6:28 p.m. | OK | Rust 2021 | TESTS | 27 | 31 | 7168000 |
Back to search problems