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 |
---|---|---|---|---|---|---|
1980 | Codeforces Round 950 (Div. 3) | FINISHED | False | 8100 | 19754663 | June 3, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 19144 ) | C | Sofia and the Lost Operations | PROGRAMMING | constructive algorithms greedy |
B"Sofia had an array of n integers a_1, a_2, ldots, a_n . One day she got bored with it, so she decided to sequentially apply m modification operations to it. Each modification operation is described by a pair of numbers langle c_j, d_j rangle and means that the element of the array with index c_j should be assigned the value d_j , i.e., perform the assignment a_{c_j} = d_j . After applying all modification operations sequentially, Sofia discarded the resulting array. Recently, you found an array of n integers b_1, b_2, ldots, b_n . You are interested in whether this array is Sofia's array. You know the values of the original array, as well as the values d_1, d_2, ldots, d_m . The values c_1, c_2, ldots, c_m turned out to be lost. Is there a sequence c_1, c_2, ldots, c_m such that the sequential application of modification operations langle c_1, d_1, rangle, langle c_2, d_2, rangle, ldots, langle c_m, d_m rangle to the array a_1, a_2, ldots, a_n transforms it into the array b_1, b_2, ldots, b_n ? The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then follow the descriptions of the test cases. The first line of each test case contains an integer n ( 1 <= n <= 2 cdot 10^5 ) -- the size of the array. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- the elements of the original array. The third line of each test case contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= 10^9 ) -- the elements of the found array. The fourth line contains an integer m ( 1 <= m <= 2 cdot 10^5 ) -- the number of modification operations. The fifth line contains m integers d_1, d_2, ldots, d_m ( 1 <= d_j <= 10^9 ) -- the preserved value for each modification operation. It is guaranteed that the su"... |
130135 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
264079954 | vivekrajsundar | C | June 4, 2024, 4:41 a.m. | OK | C# 10 | TESTS | 7 | 218 | 62361600 | ||
264065527 | A1ternate | C | June 4, 2024, 12:08 a.m. | OK | C# 10 | TESTS | 7 | 296 | 47308800 | ||
264079097 | vilee | C | June 4, 2024, 4:29 a.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 202 | 3993600 | ||
264084859 | xkeycode | C | June 4, 2024, 5:36 a.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 203 | 4915200 | ||
264083815 | Clay123 | C | June 4, 2024, 5:25 a.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 218 | 4915200 | ||
264083433 | Vignesh_VR | C | June 4, 2024, 5:21 a.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 218 | 9011200 | ||
264057164 | Le_Gusto | C | June 3, 2024, 8:46 p.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 280 | 20275200 | ||
264038900 | NotBaimaokong | C | June 3, 2024, 5:32 p.m. | OK | C++14 (GCC 6-32) | TESTS | 6 | 281 | 4812800 | ||
264082907 | iim76 | C | June 4, 2024, 5:15 a.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 296 | 5529600 | ||
264042450 | ahanf_1971 | C | June 3, 2024, 6:03 p.m. | OK | C++14 (GCC 6-32) | TESTS | 6 | 296 | 5529600 | ||
264057757 | Le_Gusto | C | June 3, 2024, 8:55 p.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 296 | 20172800 | ||
264053921 | preeetiiii | C | June 3, 2024, 8:02 p.m. | OK | C++14 (GCC 6-32) | TESTS | 7 | 311 | 8806400 | ||
264076657 | thumbass | C | June 4, 2024, 3:51 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 171 | 307200 | ||
264042523 | Arvind_Tomar | C | June 3, 2024, 6:04 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 186 | 0 | ||
264035091 | Sakiko | C | June 3, 2024, 5:07 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 186 | 2355200 | ||
264074621 | CandySanjo | C | June 4, 2024, 3:19 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 187 | 0 | ||
264038075 | Sakiko | C | June 3, 2024, 5:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 187 | 307200 | ||
264039417 | np_for_the_win | C | June 3, 2024, 5:36 p.m. | OK | C++17 (GCC 7-32) | TESTS | 6 | 187 | 4300800 | ||
264068891 | t-aswath | C | June 4, 2024, 1:43 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 202 | 4710400 | ||
264068347 | CAIMAN_SV | C | June 4, 2024, 1:29 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 202 | 4710400 | ||
264076990 | kombat__b | C | June 4, 2024, 3:56 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 202 | 4812800 | ||
264075657 | jerushimanto | C | June 4, 2024, 3:35 a.m. | OK | C++17 (GCC 7-32) | TESTS | 7 | 202 | 7270400 | ||
264078188 | prochi | C | June 4, 2024, 4:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 156 | 4403200 | ||
264034949 | mg_05 | C | June 3, 2024, 5:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 156 | 5427200 | ||
264035665 | littlebai | C | June 3, 2024, 5:10 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 156 | 6451200 | ||
264040275 | NotFound | C | June 3, 2024, 5:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 156 | 10035200 | ||
264080618 | rishyy09 | C | June 4, 2024, 4:49 a.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 171 | 1638400 | ||
264049484 | AchintyaKumar | C | June 3, 2024, 7:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 171 | 1638400 | ||
264065088 | enslaved | C | June 3, 2024, 11:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 171 | 1740800 | ||
264039275 | dogdie233 | C | June 3, 2024, 5:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 6 | 171 | 4812800 | ||
264061138 | cmottao | C | June 3, 2024, 10:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 186 | 102400 | ||
264074922 | DaRuuk | C | June 4, 2024, 3:23 a.m. | OK | C++20 (GCC 13-64) | TESTS | 7 | 186 | 10752000 | ||
264041900 | Szzzp | C | June 3, 2024, 5:58 p.m. | OK | GNU C11 | TESTS | 6 | 187 | 3276800 | ||
264063313 | crapcode | C | June 3, 2024, 11 p.m. | OK | Go | TESTS | 7 | 358 | 19148800 | ||
264080423 | Sagy13 | C | June 4, 2024, 4:47 a.m. | OK | Java 21 | TESTS | 7 | 577 | 24780800 | ||
264059154 | SD125 | C | June 3, 2024, 9:20 p.m. | OK | Java 21 | TESTS | 7 | 577 | 26828800 | ||
264068457 | hanekaeru | C | June 4, 2024, 1:32 a.m. | OK | Java 21 | TESTS | 7 | 608 | 20480000 | ||
264038515 | priyaroy3370 | C | June 3, 2024, 5:29 p.m. | OK | Java 21 | TESTS | 6 | 656 | 42598400 | ||
264040156 | aspgarv112 | C | June 3, 2024, 5:42 p.m. | OK | Java 21 | TESTS | 6 | 671 | 26112000 | ||
264071183 | yang_wei | C | June 4, 2024, 2:18 a.m. | OK | Java 21 | TESTS | 7 | 687 | 37990400 | ||
264072144 | Xing_ke | C | June 4, 2024, 2:35 a.m. | OK | Java 21 | TESTS | 7 | 718 | 44134400 | ||
264056615 | L3002 | C | June 3, 2024, 8:38 p.m. | OK | Java 21 | TESTS | 7 | 750 | 74752000 | ||
264066632 | Alpha_Zero00 | C | June 4, 2024, 12:41 a.m. | OK | Java 21 | TESTS | 7 | 764 | 47820800 | ||
264045419 | mohit458 | C | June 3, 2024, 6:29 p.m. | OK | Java 21 | TESTS | 6 | 765 | 48435200 | ||
264034324 | ycnetsisnoc | C | June 3, 2024, 5:04 p.m. | OK | Java 8 | TESTS | 6 | 343 | 13516800 | ||
264066071 | RubenCP | C | June 4, 2024, 12:25 a.m. | OK | Java 8 | TESTS | 7 | 531 | 44544000 | ||
264067286 | IvanD94 | C | June 4, 2024, 1:01 a.m. | OK | Java 8 | TESTS | 7 | 546 | 29388800 | ||
264053654 | sinha.nipun11 | C | June 3, 2024, 7:58 p.m. | OK | Java 8 | TESTS | 7 | 577 | 44748800 | ||
264053405 | UniversalAdmin | C | June 3, 2024, 7:55 p.m. | OK | Java 8 | TESTS | 7 | 577 | 45260800 | ||
264059726 | TravisBickle | C | June 3, 2024, 9:31 p.m. | OK | Java 8 | TESTS | 7 | 624 | 45670400 | ||
264075176 | achyut88 | C | June 4, 2024, 3:28 a.m. | OK | Java 8 | TESTS | 7 | 640 | 28672000 | ||
264055968 | sinha.nipun11 | C | June 3, 2024, 8:28 p.m. | OK | Java 8 | TESTS | 7 | 640 | 44544000 | ||
264073433 | Tharun_Reddy_ | C | June 4, 2024, 2:57 a.m. | OK | Java 8 | TESTS | 7 | 765 | 36864000 | ||
264032422 | Blue_BEE | C | June 3, 2024, 4:55 p.m. | OK | Java 8 | TESTS | 6 | 999 | 96972800 | ||
264046888 | aayush.mishra | C | June 3, 2024, 6:44 p.m. | OK | Kotlin 1.9 | TESTS | 7 | 765 | 36761600 | ||
264072738 | gouravasdeo11 | C | June 4, 2024, 2:46 a.m. | OK | Kotlin 1.9 | TESTS | 7 | 1093 | 18329600 | ||
264073628 | KrishBhimani | C | June 4, 2024, 3:01 a.m. | OK | PyPy 3 | TESTS | 7 | 733 | 22220800 | ||
264077593 | sanjithas908 | C | June 4, 2024, 4:06 a.m. | OK | PyPy 3 | TESTS | 7 | 764 | 22220800 | ||
264067372 | JeanExtreme002 | C | June 4, 2024, 1:03 a.m. | OK | PyPy 3 | TESTS | 7 | 765 | 26009600 | ||
264082086 | edwin121thomas | C | June 4, 2024, 5:06 a.m. | OK | PyPy 3 | TESTS | 7 | 874 | 23040000 | ||
264084054 | rickdoeswho | C | June 4, 2024, 5:27 a.m. | OK | PyPy 3-64 | TESTS | 7 | 280 | 38809600 | ||
264074106 | smilences | C | June 4, 2024, 3:09 a.m. | OK | PyPy 3-64 | TESTS | 7 | 280 | 53657600 | ||
264085490 | AUM30 | C | June 4, 2024, 5:43 a.m. | OK | PyPy 3-64 | TESTS | 7 | 281 | 38912000 | ||
264077289 | tarun_c007 | C | June 4, 2024, 4:01 a.m. | OK | PyPy 3-64 | TESTS | 7 | 296 | 37990400 | ||
264032474 | shubham22488 | C | June 3, 2024, 4:55 p.m. | OK | PyPy 3-64 | TESTS | 6 | 296 | 38092800 | ||
264087222 | Hassaan_SundarSTEM | C | June 4, 2024, 6:02 a.m. | OK | PyPy 3-64 | TESTS | 7 | 296 | 38195200 | ||
264086322 | Hassaan_SundarSTEM | C | June 4, 2024, 5:53 a.m. | OK | PyPy 3-64 | TESTS | 7 | 296 | 38502400 | ||
264078738 | debashish_1 | C | June 4, 2024, 4:23 a.m. | OK | PyPy 3-64 | TESTS | 7 | 296 | 41676800 | ||
264036246 | Nullz | C | June 3, 2024, 5:14 p.m. | OK | PyPy 3-64 | TESTS | 6 | 296 | 46489600 | ||
264077644 | satyajeetdas045 | C | June 4, 2024, 4:07 a.m. | OK | PyPy 3-64 | TESTS | 7 | 296 | 57753600 | ||
264076455 | dhruvdd8888 | C | June 4, 2024, 3:48 a.m. | OK | Python 3 | TESTS | 7 | 343 | 44646400 | ||
264074611 | Mr_Surfer | C | June 4, 2024, 3:18 a.m. | OK | Python 3 | TESTS | 7 | 358 | 44032000 | ||
264074725 | dhruvdd8888 | C | June 4, 2024, 3:20 a.m. | OK | Python 3 | TESTS | 7 | 359 | 44646400 | ||
264084605 | abhiratha | C | June 4, 2024, 5:34 a.m. | OK | Python 3 | TESTS | 7 | 390 | 44032000 | ||
264080593 | bufferacct | C | June 4, 2024, 4:49 a.m. | OK | Python 3 | TESTS | 7 | 405 | 44032000 | ||
264082150 | Surajk21 | C | June 4, 2024, 5:07 a.m. | OK | Python 3 | TESTS | 7 | 405 | 51404800 | ||
264076046 | ___a_s_1_2___ | C | June 4, 2024, 3:42 a.m. | OK | Python 3 | TESTS | 7 | 436 | 44032000 | ||
264080444 | Nishant__Ranjan | C | June 4, 2024, 4:47 a.m. | OK | Python 3 | TESTS | 7 | 436 | 45363200 | ||
264059373 | daveshub | C | June 3, 2024, 9:24 p.m. | OK | Python 3 | TESTS | 7 | 436 | 54886400 | ||
264081794 | bufferacct | C | June 4, 2024, 5:03 a.m. | OK | Python 3 | TESTS | 7 | 437 | 43110400 | ||
264073458 | SnowballSH | C | June 4, 2024, 2:58 a.m. | OK | Rust 2021 | TESTS | 7 | 109 | 14131200 | ||
264059275 | vstiff | C | June 3, 2024, 9:22 p.m. | OK | Rust 2021 | TESTS | 7 | 140 | 8908800 |
Back to search problems