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 |
---|---|---|---|---|---|---|
1721 | Educational Codeforces Round 134 (Rated for Div. 2) | FINISHED | False | 7200 | 70212299 | Aug. 27, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 13445 ) | C | Min-Max Array Transformation | PROGRAMMING | binary search greedy two pointers |
B'You are given an array a_1, a_2, ... , a_n , which is sorted in non-descending order. You decided to perform the following steps to create array b_1, b_2, ... , b_n : You are given the resulting array b . For each index i , calculate what is the minimum and maximum possible value of d_i you can choose in order to get the given array b . Note that the minimum (maximum) d_i -s are independent of each other, i. e. they can be obtained from different possible arrays d . The first line contains the single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the length of arrays a , b and d . The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ; a_i <= a_{i+1} ) -- the array a in non-descending order. The third line contains n integers b_1, b_2, ... , b_n ( 1 <= b_i <= 10^9 ; b_i <= b_{i+1} ) -- the array b in non-descending order. Additional constraints on the input: For each test case, print two lines. In the first line, print n integers d_1^{min}, d_2^{min}, ... , d_n^{min} , where d_i^{min} is the minimum possible value you can add to a_i . Secondly, print n integers d_1^{max}, d_2^{max}, ... , d_n^{max} , where d_i^{max} is the maximum possible value you can add to a_i . All d_i^{min} and d_i^{max} values are independent of each other. In other words, for each i , d_i^{min} is just the minimum value among all possible values of d_i . In the first test case, in order to get d_1^{min} = 5 , we can choose, for example, d = [5, 10, 6] . Then b = [2+5,3+10,5+6] = [7,13,11] = [7,11,13] . For d_2^{min} = 4 , we can choose d = [9, 4, 8] . Then b '... |
106416 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
169909488 | IIIIIIIIIIIIIIIIIII | C | Aug. 27, 2022, 7:14 p.m. | OK | C# 8 | TESTS | 14 | 1356 | 49356800 | ||
169898029 | gaolijie | C | Aug. 27, 2022, 5:15 p.m. | OK | Clang++20 Diagnostics | TESTS | 14 | 343 | 1843200 | ||
169912711 | garmoosh | C | Aug. 27, 2022, 8:06 p.m. | OK | GNU C11 | TESTS | 14 | 1902 | 3993600 | ||
169909393 | chethan58 | C | Aug. 27, 2022, 7:12 p.m. | OK | GNU C11 | TESTS | 14 | 1918 | 6451200 | ||
169920765 | Gocen | C | Aug. 27, 2022, 11:22 p.m. | OK | GNU C++14 | TESTS | 14 | 171 | 16076800 | ||
169905220 | alkido | C | Aug. 27, 2022, 6:21 p.m. | OK | GNU C++14 | TESTS | 14 | 186 | 1638400 | ||
169895135 | cs20b1044 | C | Aug. 27, 2022, 4:55 p.m. | OK | GNU C++14 | TESTS | 14 | 186 | 2355200 | ||
169912898 | DiaaBadr | C | Aug. 27, 2022, 8:09 p.m. | OK | GNU C++14 | TESTS | 14 | 186 | 3174400 | ||
169938330 | dangling_bird | C | Aug. 28, 2022, 5:51 a.m. | OK | GNU C++14 | TESTS | 14 | 186 | 3174400 | ||
169888157 | Dragono63 | C | Aug. 27, 2022, 4:31 p.m. | OK | GNU C++14 | TESTS | 14 | 186 | 4300800 | ||
169890199 | GMXH | C | Aug. 27, 2022, 4:34 p.m. | OK | GNU C++14 | TESTS | 14 | 187 | 1638400 | ||
169926416 | SHEXINYI | C | Aug. 28, 2022, 2:07 a.m. | OK | GNU C++14 | TESTS | 14 | 187 | 1638400 | ||
169935054 | qiling | C | Aug. 28, 2022, 5:04 a.m. | OK | GNU C++14 | TESTS | 14 | 187 | 1638400 | ||
169905350 | rons_07 | C | Aug. 27, 2022, 6:23 p.m. | OK | GNU C++14 | TESTS | 14 | 187 | 2355200 | ||
169931394 | ti21_lvhoang | C | Aug. 28, 2022, 3:47 a.m. | OK | GNU C++17 | TESTS | 14 | 171 | 3481600 | ||
169891555 | badlad | C | Aug. 27, 2022, 4:38 p.m. | OK | GNU C++17 | TESTS | 14 | 186 | 1638400 | ||
169930447 | xxxxxf_ | C | Aug. 28, 2022, 3:26 a.m. | OK | GNU C++17 | TESTS | 14 | 186 | 1638400 | ||
169891683 | gaurav1_iitr | C | Aug. 27, 2022, 4:38 p.m. | OK | GNU C++17 | TESTS | 14 | 186 | 1638400 | ||
169891755 | AtrazMacido | C | Aug. 27, 2022, 4:38 p.m. | OK | GNU C++17 | TESTS | 14 | 186 | 3276800 | ||
169926601 | Candle66 | C | Aug. 28, 2022, 2:11 a.m. | OK | GNU C++17 | TESTS | 14 | 186 | 4403200 | ||
169910033 | cdn_sna | C | Aug. 27, 2022, 7:22 p.m. | OK | GNU C++17 | TESTS | 14 | 186 | 5324800 | ||
169907503 | Belal_uddin | C | Aug. 27, 2022, 6:47 p.m. | OK | GNU C++17 | TESTS | 14 | 187 | 1638400 | ||
169936842 | weekliu | C | Aug. 28, 2022, 5:30 a.m. | OK | GNU C++17 | TESTS | 14 | 187 | 1638400 | ||
169917120 | Kariem.Taha | C | Aug. 27, 2022, 9:34 p.m. | OK | GNU C++17 | TESTS | 14 | 187 | 1638400 | ||
169901146 | Sl1ng-SHOT | C | Aug. 27, 2022, 5:42 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 124 | 3276800 | ||
169903241 | yamate11 | C | Aug. 27, 2022, 6:02 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 124 | 6451200 | ||
169939003 | anant83 | C | Aug. 28, 2022, 6 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 139 | 5734400 | ||
169932504 | 8xin | C | Aug. 28, 2022, 4:11 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 139 | 7987200 | ||
169936919 | bossypants | C | Aug. 28, 2022, 5:31 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 140 | 1638400 | ||
169933551 | er007 | C | Aug. 28, 2022, 4:32 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 140 | 1638400 | ||
169924836 | catch22 | C | Aug. 28, 2022, 1:36 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 140 | 1638400 | ||
169887957 | mlicul | C | Aug. 27, 2022, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 140 | 2457600 | ||
169923780 | yhhjl | C | Aug. 28, 2022, 1:08 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 140 | 2457600 | ||
169898977 | TrendBattles | C | Aug. 27, 2022, 5:23 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 140 | 3174400 | ||
169917456 | jay_jayjay | C | Aug. 27, 2022, 9:42 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 46 | 9420800 | ||
169921764 | RetsaZC19 | C | Aug. 27, 2022, 11:59 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 1638400 | ||
169912497 | Ragnexas | C | Aug. 27, 2022, 8:02 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 2457600 | ||
169921726 | Frus | C | Aug. 27, 2022, 11:58 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 2457600 | ||
169914728 | Blaze_Sharp | C | Aug. 27, 2022, 8:42 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 2457600 | ||
169909133 | Blaze_Sharp | C | Aug. 27, 2022, 7:08 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 2457600 | ||
169888438 | Deeplearning- | C | Aug. 27, 2022, 4:31 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 2457600 | ||
169928045 | SaltedfishY | C | Aug. 28, 2022, 2:40 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 2560000 | ||
169888757 | Javier00 | C | Aug. 27, 2022, 4:32 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 2662400 | ||
169897198 | shikhar2k01 | C | Aug. 27, 2022, 5:09 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 93 | 3174400 | ||
169898430 | koqo | C | Aug. 27, 2022, 5:18 p.m. | OK | Go | TESTS | 14 | 358 | 5529600 | ||
169923628 | nguyenkimphuongtrang | C | Aug. 28, 2022, 1:03 a.m. | OK | Go | TESTS | 14 | 373 | 5529600 | ||
169897269 | _mza | C | Aug. 27, 2022, 5:10 p.m. | OK | Java 11 | TESTS | 14 | 265 | 0 | ||
169905635 | prateeek_coder | C | Aug. 27, 2022, 6:25 p.m. | OK | Java 11 | TESTS | 14 | 374 | 8908800 | ||
169889502 | Nick | C | Aug. 27, 2022, 4:33 p.m. | OK | Java 11 | TESTS | 14 | 389 | 7475200 | ||
169901106 | no_pes | C | Aug. 27, 2022, 5:41 p.m. | OK | Java 11 | TESTS | 14 | 467 | 15667200 | ||
169905856 | ryder890 | C | Aug. 27, 2022, 6:28 p.m. | OK | Java 11 | TESTS | 14 | 530 | 22732800 | ||
169891373 | mjamiol1 | C | Aug. 27, 2022, 4:37 p.m. | OK | Java 11 | TESTS | 14 | 1622 | 7372800 | ||
169911638 | humblefool6996 | C | Aug. 27, 2022, 7:48 p.m. | OK | Java 11 | TESTS | 14 | 1653 | 10649600 | ||
169909002 | ushikawa | C | Aug. 27, 2022, 7:07 p.m. | OK | Java 11 | TESTS | 14 | 1716 | 12902400 | ||
169887533 | kyaruru | C | Aug. 27, 2022, 4:30 p.m. | OK | Java 11 | TESTS | 14 | 1747 | 22630400 | ||
169908712 | tanish_1131 | C | Aug. 27, 2022, 7:03 p.m. | OK | Java 11 | TESTS | 14 | 1808 | 9728000 | ||
169925396 | kkz666 | C | Aug. 28, 2022, 1:46 a.m. | OK | Java 17 | TESTS | 14 | 529 | 10035200 | ||
169887750 | RahulAhuja2901 | C | Aug. 27, 2022, 4:30 p.m. | OK | Java 8 | TESTS | 14 | 171 | 0 | ||
169922120 | Sussykin | C | Aug. 28, 2022, 12:12 a.m. | OK | Java 8 | TESTS | 14 | 186 | 0 | ||
169901965 | gaolijie | C | Aug. 27, 2022, 5:49 p.m. | OK | Java 8 | TESTS | 14 | 187 | 0 | ||
169900333 | megaspazz | C | Aug. 27, 2022, 5:34 p.m. | OK | Java 8 | TESTS | 14 | 202 | 0 | ||
169918852 | Kharouba | C | Aug. 27, 2022, 10:20 p.m. | OK | Java 8 | TESTS | 14 | 280 | 16998400 | ||
169911172 | NerfThis | C | Aug. 27, 2022, 7:40 p.m. | OK | Java 8 | TESTS | 14 | 296 | 17817600 | ||
169901623 | gaolijie | C | Aug. 27, 2022, 5:46 p.m. | OK | Java 8 | TESTS | 14 | 311 | 4096000 | ||
169899742 | gaolijie | C | Aug. 27, 2022, 5:29 p.m. | OK | Java 8 | TESTS | 14 | 327 | 17203200 | ||
169903768 | athu18 | C | Aug. 27, 2022, 6:07 p.m. | OK | Java 8 | TESTS | 14 | 327 | 20377600 | ||
169892577 | r3hab.rs | C | Aug. 27, 2022, 4:42 p.m. | OK | Java 8 | TESTS | 14 | 327 | 21811200 | ||
169924881 | Fish_L | C | Aug. 28, 2022, 1:37 a.m. | OK | MS C++ 2017 | TESTS | 14 | 624 | 4710400 | ||
169892571 | KKastaneda | C | Aug. 27, 2022, 4:42 p.m. | OK | MS C++ 2017 | TESTS | 14 | 686 | 3174400 | ||
169900990 | Rjjsumant | C | Aug. 27, 2022, 5:40 p.m. | OK | MS C++ 2017 | TESTS | 14 | 763 | 11264000 | ||
169915379 | K_0_R_D | C | Aug. 27, 2022, 8:56 p.m. | OK | MS C++ 2017 | TESTS | 14 | 888 | 4198400 | ||
169895782 | 1_2_3_4_5_9 | C | Aug. 27, 2022, 4:59 p.m. | OK | PyPy 2 | TESTS | 14 | 249 | 36966400 | ||
169894826 | Bvian315 | C | Aug. 27, 2022, 4:54 p.m. | OK | PyPy 3 | TESTS | 14 | 1263 | 22118400 | ||
169899062 | ameta | C | Aug. 27, 2022, 5:24 p.m. | OK | PyPy 3 | TESTS | 14 | 1419 | 22835200 | ||
169887302 | kimerikal | C | Aug. 27, 2022, 4:29 p.m. | OK | PyPy 3-64 | TESTS | 14 | 249 | 38195200 | ||
169894458 | SophieHatter | C | Aug. 27, 2022, 4:51 p.m. | OK | PyPy 3-64 | TESTS | 14 | 249 | 48435200 | ||
169887267 | Croco | C | Aug. 27, 2022, 4:29 p.m. | OK | PyPy 3-64 | TESTS | 14 | 265 | 39731200 | ||
169891826 | sr3gm2 | C | Aug. 27, 2022, 4:39 p.m. | OK | PyPy 3-64 | TESTS | 14 | 280 | 40243200 | ||
169894844 | mohamedsamirtkd | C | Aug. 27, 2022, 4:54 p.m. | OK | PyPy 3-64 | TESTS | 14 | 296 | 35737600 | ||
169904055 | shiviDON | C | Aug. 27, 2022, 6:10 p.m. | OK | PyPy 3-64 | TESTS | 14 | 311 | 35020800 | ||
169911246 | Pandeyjiii8250 | C | Aug. 27, 2022, 7:41 p.m. | OK | PyPy 3-64 | TESTS | 14 | 311 | 40755200 | ||
169891154 | Amay12 | C | Aug. 27, 2022, 4:36 p.m. | OK | PyPy 3-64 | TESTS | 14 | 311 | 56832000 | ||
169894048 | Code_Breaker101 | C | Aug. 27, 2022, 4:49 p.m. | OK | PyPy 3-64 | TESTS | 14 | 327 | 36147200 | ||
169929831 | Matthew0730 | C | Aug. 28, 2022, 3:13 a.m. | OK | PyPy 3-64 | TESTS | 14 | 421 | 38195200 | ||
169893953 | Kenolan | C | Aug. 27, 2022, 4:49 p.m. | OK | Python 3 | TESTS | 14 | 608 | 30720000 | ||
169922355 | Uruguay | C | Aug. 28, 2022, 12:20 a.m. | OK | Python 3 | TESTS | 14 | 873 | 22528000 | ||
169916048 | sagarpal1909 | C | Aug. 27, 2022, 9:09 p.m. | OK | Python 3 | TESTS | 14 | 904 | 22528000 | ||
169895503 | aayush_chhabra | C | Aug. 27, 2022, 4:58 p.m. | OK | Python 3 | TESTS | 14 | 904 | 22528000 | ||
169903854 | tejas11 | C | Aug. 27, 2022, 6:08 p.m. | OK | Python 3 | TESTS | 14 | 951 | 24064000 | ||
169892141 | sandy_5000 | C | Aug. 27, 2022, 4:40 p.m. | OK | Python 3 | TESTS | 14 | 998 | 23756800 | ||
169899710 | Prajapat | C | Aug. 27, 2022, 5:29 p.m. | OK | Python 3 | TESTS | 14 | 1122 | 23347200 | ||
169896336 | magnus.hegdahl | C | Aug. 27, 2022, 5:03 p.m. | OK | Rust 2021 | TESTS | 14 | 31 | 3891200 | ||
169886878 | notchameleon | C | Aug. 27, 2022, 4:28 p.m. | OK | Rust 2021 | TESTS | 14 | 218 | 21504000 | ||
169887099 | macosta | C | Aug. 27, 2022, 4:29 p.m. | OK | Rust 2021 | TESTS | 14 | 233 | 19968000 |
Back to search problems