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 |
---|---|---|---|---|---|---|
1546 | Codeforces Round 732 (Div. 2) | FINISHED | False | 9000 | 105810899 | July 11, 2021, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 18236 ) | A | AquaMoon and Two Arrays | PROGRAMMING | brute force greedy | 800 |
B'AquaMoon and Cirno are playing an interesting game with arrays. Cirno has prepared two arrays a and b , both consist of n non-negative integers. AquaMoon can perform the following operation an arbitrary number of times (possibly zero): AquaMoon wants to make some operations to make arrays a and b equal. Two arrays a and b are considered equal if and only if a_i = b_i for all 1 <= q i <= q n . Help AquaMoon to find a sequence of operations that will solve her problem or find, that it is impossible to make arrays a and b equal. Please note, that you don 't have to minimize the number of operations. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= q n <= q 100 ). The second line of each test case contains n integers a_1, a_2, ... , a_n ( 0 <= q a_i <= q 100 ). The sum of all a_i does not exceed 100 . The third line of each test case contains n integers b_1, b_2, ... , b_n ( 0 <= q b_i <= q 100 ). The sum of all b_i does not exceed 100 . For each test case print "-1" on the only line if it is impossible to make two arrays equal with some sequence of operations. Otherwise, print an integer m ( 0 <= q m <= q 100 ) in the first line -- the number of operations. Then print m lines, each line consists of two integers i and j -- the indices you choose for the operation. It can be proven that if it is possible to make two arrays equal with some sequence of operations, there exists a sequence with m <= q 100 . If there are multiple possible solutions, you can print any. In the first example, we do the following operations: In the second example, it 's impossible to make two arrays equal. '... |
Codeforces Round #732 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
122117941 | PAG | A | July 11, 2021, 3:47 p.m. | OK | FPC | TESTS | 19 | 46 | 9830400 | 800 | |
122161970 | PranayB003 | A | July 12, 2021, 2:44 a.m. | OK | GNU C11 | TESTS | 19 | 30 | 3686400 | 800 | |
122128455 | aditya_1511 | A | July 11, 2021, 4:26 p.m. | OK | GNU C11 | TESTS | 19 | 31 | 3686400 | 800 | |
122138060 | murali_33 | A | July 11, 2021, 6:13 p.m. | OK | GNU C11 | TESTS | 19 | 31 | 3891200 | 800 | |
122138686 | murali_33 | A | July 11, 2021, 6:21 p.m. | OK | GNU C11 | TESTS | 19 | 31 | 4710400 | 800 | |
122138555 | murali_33 | A | July 11, 2021, 6:19 p.m. | OK | GNU C11 | TESTS | 19 | 31 | 4710400 | 800 | |
122135851 | Angsuman | A | July 11, 2021, 5:48 p.m. | OK | GNU C11 | TESTS | 19 | 46 | 3686400 | 800 | |
122125130 | ThursdayLoser | A | July 11, 2021, 4:13 p.m. | OK | GNU C11 | TESTS | 19 | 46 | 3686400 | 800 | |
122119932 | Nihan_Mahmud | A | July 11, 2021, 3:54 p.m. | OK | GNU C11 | TESTS | 19 | 46 | 3686400 | 800 | |
122129271 | satyam193 | A | July 11, 2021, 4:29 p.m. | OK | GNU C11 | TESTS | 19 | 46 | 4096000 | 800 | |
122124163 | kathariakhila | A | July 11, 2021, 4:10 p.m. | OK | GNU C11 | TESTS | 19 | 61 | 3686400 | 800 | |
122159949 | NXYorz | A | July 12, 2021, 2:07 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3686400 | 800 | |
122128664 | kanata90 | A | July 11, 2021, 4:27 p.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3891200 | 800 | |
122158000 | WithOrchild | A | July 12, 2021, 1:22 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3891200 | 800 | |
122157358 | Bananana. | A | July 12, 2021, 1:07 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3891200 | 800 | |
122173431 | luogu_bot2 | A | July 12, 2021, 5:55 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3891200 | 800 | |
122173291 | BlueInRed | A | July 12, 2021, 5:53 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3891200 | 800 | |
122164292 | walk_alone | A | July 12, 2021, 3:25 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3891200 | 800 | |
122158138 | Sham_Devour | A | July 12, 2021, 1:26 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3891200 | 800 | |
122168997 | lzc2001 | A | July 12, 2021, 4:50 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3993600 | 800 | |
122169064 | lzc2001 | A | July 12, 2021, 4:51 a.m. | OK | GNU C++11 | TESTS | 19 | 15 | 3993600 | 800 | |
122173883 | john_28 | A | July 12, 2021, 6:02 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122171152 | Rahul19771 | A | July 12, 2021, 5:23 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122169575 | Arijit18 | A | July 12, 2021, 4:59 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122169437 | presscoder | A | July 12, 2021, 4:57 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122168136 | enceladuss | A | July 12, 2021, 4:36 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122167677 | ketan120901 | A | July 12, 2021, 4:28 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122167287 | Enriquecosmos41 | A | July 12, 2021, 4:21 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122165357 | villizain6 | A | July 12, 2021, 3:45 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122164134 | gulab3092 | A | July 12, 2021, 3:22 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122162093 | amolrai | A | July 12, 2021, 2:46 a.m. | OK | GNU C++14 | TESTS | 19 | 15 | 3891200 | 800 | |
122171008 | Hakesh729 | A | July 12, 2021, 5:21 a.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122163522 | sid_rasa | A | July 12, 2021, 3:11 a.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122167394 | Unknown_coder_10 | A | July 12, 2021, 4:23 a.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122118832 | tarunbhandari825 | A | July 11, 2021, 3:50 p.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122133835 | Circle_of_Death | A | July 11, 2021, 5:31 p.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122135648 | adidas15901 | A | July 11, 2021, 5:46 p.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122142189 | shalekberli | A | July 11, 2021, 7:17 p.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122152294 | toshendra_nitrr | A | July 11, 2021, 10:08 p.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3788800 | 800 | |
122171575 | imprakarsh | A | July 12, 2021, 5:29 a.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3891200 | 800 | |
122170891 | vinamra_22 | A | July 12, 2021, 5:20 a.m. | OK | GNU C++17 | TESTS | 19 | 15 | 3891200 | 800 | |
122163420 | s_phoenix | A | July 12, 2021, 3:09 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122170260 | mujumdarishan | A | July 12, 2021, 5:10 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122169455 | dlbm1302 | A | July 12, 2021, 4:57 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122169238 | DeclareWar | A | July 12, 2021, 4:54 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122167891 | arnav2004 | A | July 12, 2021, 4:31 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122167125 | ____________ | A | July 12, 2021, 4:17 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122166838 | shmad | A | July 12, 2021, 4:12 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122165363 | shivam_100 | A | July 12, 2021, 3:45 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122164559 | dutinmeow | A | July 12, 2021, 3:29 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122164152 | simply_hooman | A | July 12, 2021, 3:22 a.m. | OK | GNU C++17 (64) | TESTS | 19 | 15 | 4300800 | 800 | |
122145694 | Hasker | A | July 11, 2021, 8:27 p.m. | OK | Haskell | TESTS | 19 | 15 | 11673600 | 800 | |
122138306 | clyring | A | July 11, 2021, 6:16 p.m. | OK | Haskell | TESTS | 19 | 46 | 11673600 | 800 | |
122147218 | Yuxiang | A | July 11, 2021, 9:06 p.m. | OK | Java 11 | TESTS | 19 | 202 | 23961600 | 800 | |
122123450 | sal_vat_ion | A | July 11, 2021, 4:07 p.m. | OK | Java 11 | TESTS | 19 | 202 | 23961600 | 800 | |
122140588 | ImpossibleCode | A | July 11, 2021, 6:49 p.m. | OK | Java 11 | TESTS | 19 | 202 | 24166400 | 800 | |
122172972 | SaberXpro | A | July 12, 2021, 5:49 a.m. | OK | Java 11 | TESTS | 19 | 202 | 24268800 | 800 | |
122166080 | YashSaxena | A | July 12, 2021, 3:58 a.m. | OK | Java 11 | TESTS | 19 | 217 | 24166400 | 800 | |
122143053 | themadknight45 | A | July 11, 2021, 7:33 p.m. | OK | Java 11 | TESTS | 19 | 217 | 24473600 | 800 | |
122159220 | BestEveryman | A | July 12, 2021, 1:50 a.m. | OK | Java 11 | TESTS | 19 | 218 | 23961600 | 800 | |
122134472 | mandalrahul | A | July 11, 2021, 5:35 p.m. | OK | Java 11 | TESTS | 19 | 218 | 24166400 | 800 | |
122127517 | m1m3n1n3 | A | July 11, 2021, 4:23 p.m. | OK | Java 11 | TESTS | 19 | 233 | 24064000 | 800 | |
122142298 | Kunal_30 | A | July 11, 2021, 7:19 p.m. | OK | Java 11 | TESTS | 19 | 233 | 24166400 | 800 | |
122141058 | Zatona | A | July 11, 2021, 6:57 p.m. | OK | Java 8 | TESTS | 19 | 108 | 20684800 | 800 | |
122147146 | tishrah_ | A | July 11, 2021, 9:04 p.m. | OK | Java 8 | TESTS | 19 | 108 | 20787200 | 800 | |
122170438 | SAURABH16_ | A | July 12, 2021, 5:13 a.m. | OK | Java 8 | TESTS | 19 | 109 | 20480000 | 800 | |
122138444 | gagan_6730 | A | July 11, 2021, 6:18 p.m. | OK | Java 8 | TESTS | 19 | 109 | 20480000 | 800 | |
122162358 | trappy00_28 | A | July 12, 2021, 2:51 a.m. | OK | Java 8 | TESTS | 19 | 109 | 20684800 | 800 | |
122138324 | darsh065 | A | July 11, 2021, 6:16 p.m. | OK | Java 8 | TESTS | 19 | 109 | 20992000 | 800 | |
122169749 | Halix | A | July 12, 2021, 5:02 a.m. | OK | Java 8 | TESTS | 19 | 124 | 20480000 | 800 | |
122166771 | Pranay2516 | A | July 12, 2021, 4:11 a.m. | OK | Java 8 | TESTS | 19 | 124 | 20582400 | 800 | |
122135943 | harsh_03_m | A | July 11, 2021, 5:48 p.m. | OK | Java 8 | TESTS | 19 | 139 | 61542400 | 800 | |
122138526 | Pranshul_kharniwal | A | July 11, 2021, 6:19 p.m. | OK | Java 8 | TESTS | 19 | 140 | 20684800 | 800 | |
122136740 | rabbitsthecat | A | July 11, 2021, 5:57 p.m. | OK | Kotlin | TESTS | 19 | 186 | 22016000 | 800 | |
122142934 | steeltrooper | A | July 11, 2021, 7:31 p.m. | OK | MS C++ | TESTS | 19 | 31 | 4710400 | 800 | |
122121495 | zhuzhuxia01 | A | July 11, 2021, 3:59 p.m. | OK | MS C++ | TESTS | 19 | 46 | 3891200 | 800 | |
122158715 | swz | A | July 12, 2021, 1:39 a.m. | OK | MS C++ 2017 | TESTS | 19 | 15 | 3788800 | 800 | |
122120223 | liudonghao2020 | A | July 11, 2021, 3:55 p.m. | OK | MS C++ 2017 | TESTS | 19 | 30 | 3686400 | 800 | |
122158441 | chiking | A | July 12, 2021, 1:33 a.m. | OK | MS C++ 2017 | TESTS | 19 | 30 | 3686400 | 800 | |
122136959 | kimpro1010 | A | July 11, 2021, 6 p.m. | OK | MS C++ 2017 | TESTS | 19 | 31 | 3788800 | 800 | |
122128984 | ravina_b29 | A | July 11, 2021, 4:28 p.m. | OK | MS C++ 2017 | TESTS | 19 | 46 | 3788800 | 800 | |
122136775 | UnHingedFrog | A | July 11, 2021, 5:57 p.m. | OK | MS C++ 2017 | TESTS | 19 | 46 | 4096000 | 800 | |
122133845 | Ahad726 | A | July 11, 2021, 5:31 p.m. | OK | .NET Core C# | TESTS | 19 | 109 | 13312000 | 800 | |
122144325 | henrychenOutlook | A | July 11, 2021, 7:58 p.m. | OK | Node.js | TESTS | 19 | 124 | 15974400 | 800 | |
122144143 | henrychenOutlook | A | July 11, 2021, 7:55 p.m. | OK | Node.js | TESTS | 19 | 139 | 15872000 | 800 | |
122154138 | bjy | A | July 11, 2021, 11:20 p.m. | OK | PyPy 3 | TESTS | 19 | 124 | 23244800 | 800 | |
122140037 | crap_the_coder | A | July 11, 2021, 6:41 p.m. | OK | PyPy 3 | TESTS | 19 | 124 | 23654400 | 800 | |
122125444 | TarasNeroznak | A | July 11, 2021, 4:15 p.m. | OK | PyPy 3 | TESTS | 19 | 140 | 22425600 | 800 | |
122141995 | Mistaek | A | July 11, 2021, 7:14 p.m. | OK | PyPy 3 | TESTS | 19 | 140 | 24268800 | 800 | |
122135185 | suchadisappointmentiam | A | July 11, 2021, 5:42 p.m. | OK | PyPy 3 | TESTS | 19 | 140 | 24268800 | 800 | |
122118786 | mahima2001 | A | July 11, 2021, 3:50 p.m. | OK | PyPy 3 | TESTS | 19 | 140 | 24268800 | 800 | |
122166574 | rivnam | A | July 12, 2021, 4:08 a.m. | OK | PyPy 3 | TESTS | 19 | 140 | 24473600 | 800 | |
122135892 | SPD_9X2 | A | July 11, 2021, 5:48 p.m. | OK | PyPy 3 | TESTS | 19 | 140 | 25292800 | 800 | |
122135543 | PiKa_PiKaa_chuuu | A | July 11, 2021, 5:45 p.m. | OK | PyPy 3 | TESTS | 19 | 155 | 23449600 | 800 | |
122147839 | light_yagami52 | A | July 11, 2021, 9:24 p.m. | OK | PyPy 3 | TESTS | 19 | 155 | 24166400 | 800 | |
122166599 | abhi_dhanraj | A | July 12, 2021, 4:08 a.m. | OK | Python 3 | TESTS | 19 | 62 | 6963200 | 800 | |
122165499 | karan_chawla | A | July 12, 2021, 3:47 a.m. | OK | Python 3 | TESTS | 19 | 62 | 6963200 | 800 | |
122139924 | praneethvasa | A | July 11, 2021, 6:39 p.m. | OK | Python 3 | TESTS | 19 | 62 | 6963200 | 800 | |
122124241 | hemant25 | A | July 11, 2021, 4:10 p.m. | OK | Python 3 | TESTS | 19 | 62 | 6963200 | 800 | |
122120313 | Provokian | A | July 11, 2021, 3:55 p.m. | OK | Python 3 | TESTS | 19 | 62 | 6963200 | 800 | |
122173434 | eugalt | A | July 12, 2021, 5:55 a.m. | OK | Python 3 | TESTS | 19 | 77 | 6963200 | 800 | |
122171646 | pranjal.s.sarkari | A | July 12, 2021, 5:30 a.m. | OK | Python 3 | TESTS | 19 | 77 | 6963200 | 800 | |
122171429 | sh1194 | A | July 12, 2021, 5:27 a.m. | OK | Python 3 | TESTS | 19 | 77 | 6963200 | 800 | |
122166070 | MuvvaSrija | A | July 12, 2021, 3:58 a.m. | OK | Python 3 | TESTS | 19 | 77 | 6963200 | 800 | |
122164929 | Shrink | A | July 12, 2021, 3:36 a.m. | OK | Python 3 | TESTS | 19 | 77 | 6963200 | 800 | |
122163994 | p00f | A | July 12, 2021, 3:19 a.m. | OK | Rust | TESTS | 19 | 31 | 3891200 | 800 |
Back to search problems