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 | 79802663 | July 10, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 22829 ) | C | Train and Queries | PROGRAMMING | data structures greedy |
B"Along the railroad there are stations indexed from 1 to 10^9 . An express train always travels along a route consisting of n stations with indices u_1, u_2, ... , u_n , where ( 1 <= u_i <= 10^9 ). The train travels along the route from left to right. It starts at station u_1 , then stops at station u_2 , then at u_3 , and so on. Station u_n -- the terminus. It is possible that the train will visit the same station more than once. That is, there may be duplicates among the values u_1, u_2, ... , u_n . You are given k queries, each containing two different integers a_j and b_j ( 1 <= a_j, b_j <= 10^9 ). For each query, determine whether it is possible to travel by train from the station with index a_j to the station with index b_j . For example, let the train route consist of 6 of stations with indices [ 3, 7, 1, 5, 1, 4 ] and give 3 of the following queries: It is possible to travel from station 3 to station 5 by taking a section of the route consisting of stations [ 3, 7, 1, 5 ]. Answer: YES. You cannot travel from station 1 to station 7 because the train cannot travel in the opposite direction. Answer: NO. It is not possible to travel from station 3 to station 10 because station 10 is not part of the train's route. Answer: NO. The first line of the input contains an integer t ( 1 <= t <= 10^4 ) --the number of test cases in the test. The descriptions of the test cases follow. The first line of each test case is empty. The second line of each test case contains two integers: n and k ( 1 <= n <= 2 cdot 10^5, 1 <= k <= 2 cdot 10^5 ) --the number of stations the train route consists of and the number of queries. The third line of each test case contains exactly n integers u_1, u_2, ... , u_n ( 1 <= u_i <= 10^9 ). The values u_1, u_2, ... , u_n"... |
104763 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
163623541 | chrisfcoder | C | July 11, 2022, 4:59 a.m. | OK | C# 10 | TESTS | 34 | 312 | 45260800 | ||
163599571 | ansergeyg | C | July 10, 2022, 8:43 p.m. | OK | C# 8 | TESTS | 34 | 217 | 39219200 | ||
163603696 | SD8 | C | July 10, 2022, 10:31 p.m. | OK | C# 8 | TESTS | 34 | 342 | 48332800 | ||
163603709 | bluemegane | C | July 10, 2022, 10:31 p.m. | OK | C# 8 | TESTS | 34 | 343 | 55910400 | ||
163603597 | bluemegane | C | July 10, 2022, 10:28 p.m. | OK | C# 8 | TESTS | 34 | 841 | 59084800 | ||
163627412 | gopikrishna000 | C | July 11, 2022, 5:47 a.m. | OK | GNU C++14 | TESTS | 34 | 217 | 6144000 | ||
163606595 | Yuan_Li | C | July 11, 2022, 12:08 a.m. | OK | GNU C++14 | TESTS | 34 | 217 | 6144000 | ||
163624872 | bhaskara_3 | C | July 11, 2022, 5:18 a.m. | OK | GNU C++14 | TESTS | 34 | 218 | 6144000 | ||
163605439 | AhmedHani | C | July 10, 2022, 11:27 p.m. | OK | GNU C++14 | TESTS | 34 | 218 | 6144000 | ||
163628603 | sirish1527 | C | July 11, 2022, 6 a.m. | OK | GNU C++14 | TESTS | 34 | 218 | 11161600 | ||
163624005 | BobThBuilder_74 | C | July 11, 2022, 5:06 a.m. | OK | GNU C++14 | TESTS | 34 | 249 | 6144000 | ||
163601473 | srijanc | C | July 10, 2022, 9:29 p.m. | OK | GNU C++14 | TESTS | 34 | 249 | 12697600 | ||
163627769 | zhangshifan1 | C | July 11, 2022, 5:51 a.m. | OK | GNU C++14 | TESTS | 34 | 264 | 2457600 | ||
163588334 | lkhanh | C | July 10, 2022, 5:55 p.m. | OK | GNU C++14 | TESTS | 4 | 264 | 3174400 | ||
163593834 | Shubh_30 | C | July 10, 2022, 7:04 p.m. | OK | GNU C++14 | TESTS | 4 | 264 | 10956800 | ||
163608936 | A3-247 | C | July 11, 2022, 1:09 a.m. | OK | GNU C++17 | TESTS | 34 | 202 | 9318400 | ||
163600245 | heehcs | C | July 10, 2022, 8:58 p.m. | OK | GNU C++17 | TESTS | 34 | 217 | 13004800 | ||
163620989 | punitpatel | C | July 11, 2022, 4:22 a.m. | OK | GNU C++17 | TESTS | 34 | 218 | 5939200 | ||
163612355 | Rocko786 | C | July 11, 2022, 2:13 a.m. | OK | GNU C++17 | TESTS | 34 | 218 | 5939200 | ||
163608884 | A3-247 | C | July 11, 2022, 1:08 a.m. | OK | GNU C++17 | TESTS | 34 | 218 | 9318400 | ||
163621768 | jaikhatri9827 | C | July 11, 2022, 4:35 a.m. | OK | GNU C++17 | TESTS | 34 | 233 | 6758400 | ||
163605357 | doing | C | July 10, 2022, 11:25 p.m. | OK | GNU C++17 | TESTS | 34 | 233 | 6758400 | ||
163600925 | heehcs | C | July 10, 2022, 9:14 p.m. | OK | GNU C++17 | TESTS | 34 | 233 | 12083200 | ||
163600963 | heehcs | C | July 10, 2022, 9:15 p.m. | OK | GNU C++17 | TESTS | 34 | 233 | 13004800 | ||
163602954 | heehcs | C | July 10, 2022, 10:09 p.m. | OK | GNU C++17 | TESTS | 34 | 233 | 14336000 | ||
163595694 | pratham071 | C | July 10, 2022, 7:33 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 171 | 1638400 | ||
163605772 | Danielson | C | July 10, 2022, 11:39 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 202 | 1638400 | ||
163608948 | shity_handle | C | July 11, 2022, 1:10 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 264 | 19046400 | ||
163596314 | pratham071 | C | July 10, 2022, 7:42 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 280 | 16179200 | ||
163601634 | jesse_pinkman_619 | C | July 10, 2022, 9:33 p.m. | OK | GNU C++17 (64) | TESTS | 34 | 280 | 22016000 | ||
163608926 | shity_handle | C | July 11, 2022, 1:09 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 311 | 22732800 | ||
163598193 | woonder | C | July 10, 2022, 8:17 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 405 | 12902400 | ||
163625756 | paul_t | C | July 11, 2022, 5:29 a.m. | OK | GNU C++17 (64) | TESTS | 34 | 436 | 20172800 | ||
163592892 | BigSecret | C | July 10, 2022, 6:50 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 436 | 20172800 | ||
163584672 | YoussefMorad1 | C | July 10, 2022, 5:20 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 467 | 13721600 | ||
163593403 | kiquxd | C | July 10, 2022, 6:57 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 139 | 1638400 | ||
163595783 | ghannu | C | July 10, 2022, 7:34 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 171 | 9932800 | ||
163587057 | SAYANJIT7 | C | July 10, 2022, 5:42 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 171 | 22835200 | ||
163627806 | Leokkk17 | C | July 11, 2022, 5:51 a.m. | OK | GNU C++20 (64) | TESTS | 34 | 187 | 3276800 | ||
163592338 | Sukhendu | C | July 10, 2022, 6:43 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 187 | 10752000 | ||
163595284 | seokjin1013 | C | July 10, 2022, 7:26 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 202 | 6451200 | ||
163596395 | pratham071 | C | July 10, 2022, 7:44 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 233 | 16179200 | ||
163583960 | koder100 | C | July 10, 2022, 5:15 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 249 | 16793600 | ||
163596695 | DaVinci | C | July 10, 2022, 7:49 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 249 | 20582400 | ||
163584431 | v-v | C | July 10, 2022, 5:18 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 249 | 20684800 | ||
163600623 | megabluejay | C | July 10, 2022, 9:07 p.m. | OK | Haskell | TESTS | 34 | 1840 | 174387200 | ||
163587041 | abhayptsr | C | July 10, 2022, 5:42 p.m. | OK | Java 11 | TESTS | 4 | 608 | 39014400 | ||
163615296 | giridhrubajyoti2002 | C | July 11, 2022, 3 a.m. | OK | Java 11 | TESTS | 34 | 686 | 41472000 | ||
163583499 | liebigbear | C | July 10, 2022, 5:12 p.m. | OK | Java 11 | TESTS | 4 | 732 | 30822400 | ||
163611644 | Wuya | C | July 11, 2022, 2 a.m. | OK | Java 11 | TESTS | 34 | 763 | 28672000 | ||
163626786 | Deepak4466 | C | July 11, 2022, 5:41 a.m. | OK | Java 11 | TESTS | 34 | 826 | 41267200 | ||
163604507 | Saeed.Afshari | C | July 10, 2022, 10:55 p.m. | OK | Java 11 | TESTS | 34 | 826 | 56934400 | ||
163620981 | rishabhpanchal | C | July 11, 2022, 4:22 a.m. | OK | Java 11 | TESTS | 34 | 950 | 68812800 | ||
163603564 | newguy1 | C | July 10, 2022, 10:27 p.m. | OK | Java 11 | TESTS | 34 | 1434 | 55296000 | ||
163585586 | Ali04 | C | July 10, 2022, 5:28 p.m. | OK | Java 11 | TESTS | 4 | 1591 | 71065600 | ||
163608076 | nis1234 | C | July 11, 2022, 12:50 a.m. | OK | Java 11 | TESTS | 34 | 1622 | 16281600 | ||
163611617 | JunaidPathan | C | July 11, 2022, 1:59 a.m. | OK | Java 17 | TESTS | 34 | 764 | 40960000 | ||
163592977 | umaganesh | C | July 10, 2022, 6:51 p.m. | OK | Java 17 | TESTS | 4 | 2106 | 33587200 | ||
163587289 | kihyo | C | July 10, 2022, 5:44 p.m. | OK | Java 17 | TESTS | 4 | 2604 | 28364800 | ||
163596835 | K-E | C | July 10, 2022, 7:52 p.m. | OK | Java 17 | TESTS | 4 | 2823 | 54988800 | ||
163603244 | adi_7861 | C | July 10, 2022, 10:18 p.m. | OK | Java 8 | TESTS | 34 | 499 | 31232000 | ||
163603078 | BEANSS | C | July 10, 2022, 10:13 p.m. | OK | Java 8 | TESTS | 34 | 514 | 37580800 | ||
163612542 | T-error | C | July 11, 2022, 2:16 a.m. | OK | Java 8 | TESTS | 34 | 576 | 32358400 | ||
163584669 | Kritika717 | C | July 10, 2022, 5:20 p.m. | OK | Java 8 | TESTS | 4 | 576 | 43212800 | ||
163596063 | Mohamed_A7med | C | July 10, 2022, 7:38 p.m. | OK | Java 8 | TESTS | 4 | 592 | 35328000 | ||
163602776 | WrongAnswerOnTestCase2 | C | July 10, 2022, 10:04 p.m. | OK | Java 8 | TESTS | 34 | 592 | 35430400 | ||
163603338 | AbdelrahmanFathy | C | July 10, 2022, 10:21 p.m. | OK | Java 8 | TESTS | 34 | 607 | 42393600 | ||
163600287 | Sussykin | C | July 10, 2022, 8:59 p.m. | OK | Java 8 | TESTS | 34 | 670 | 53862400 | ||
163628467 | Java_Programmer | C | July 11, 2022, 5:59 a.m. | OK | Java 8 | TESTS | 34 | 733 | 48332800 | ||
163603223 | adi_7861 | C | July 10, 2022, 10:17 p.m. | OK | Java 8 | TESTS | 34 | 982 | 34611200 | ||
163587529 | mariaskury | C | July 10, 2022, 5:46 p.m. | OK | JavaScript | TESTS | 4 | 1200 | 67788800 | ||
163614949 | Superlau | C | July 11, 2022, 2:54 a.m. | OK | MS C++ 2017 | TESTS | 34 | 311 | 18022400 | ||
163613671 | Superlau | C | July 11, 2022, 2:34 a.m. | OK | MS C++ 2017 | TESTS | 34 | 592 | 15360000 | ||
163593728 | sappy_08 | C | July 10, 2022, 7:02 p.m. | OK | MS C++ 2017 | TESTS | 4 | 1309 | 13619200 | ||
163591360 | egorqwq | C | July 10, 2022, 6:29 p.m. | OK | MS C++ 2017 | TESTS | 4 | 1356 | 8089600 | ||
163594870 | KemPi | C | July 10, 2022, 7:19 p.m. | OK | MS C++ 2017 | TESTS | 4 | 1357 | 17100800 | ||
163598695 | aki79 | C | July 10, 2022, 8:27 p.m. | OK | PHP | TESTS | 4 | 296 | 58880000 | ||
163592583 | bpdolson | C | July 10, 2022, 6:46 p.m. | OK | PyPy 3 | TESTS | 4 | 420 | 37273600 | ||
163593568 | hash1023 | C | July 10, 2022, 7 p.m. | OK | PyPy 3 | TESTS | 4 | 545 | 49254400 | ||
163627316 | rajeshpenugonda6 | C | July 11, 2022, 5:46 a.m. | OK | PyPy 3 | TESTS | 34 | 655 | 178176000 | ||
163592470 | hritik3878 | C | July 10, 2022, 6:44 p.m. | OK | PyPy 3 | TESTS | 4 | 701 | 83148800 | ||
163628293 | wyxfwxh250821 | C | July 11, 2022, 5:57 a.m. | OK | PyPy 3 | TESTS | 34 | 748 | 50483200 | ||
163628068 | wyxfwxh250821 | C | July 11, 2022, 5:54 a.m. | OK | PyPy 3 | TESTS | 34 | 748 | 61644800 | ||
163628147 | Greyhound | C | July 11, 2022, 5:55 a.m. | OK | PyPy 3 | TESTS | 34 | 764 | 58777600 | ||
163615554 | mnm_001 | C | July 11, 2022, 3:03 a.m. | OK | PyPy 3 | TESTS | 34 | 810 | 64307200 | ||
163593330 | sushmanth.dampur8780 | C | July 10, 2022, 6:56 p.m. | OK | PyPy 3 | TESTS | 4 | 967 | 26828800 | ||
163590124 | tcltk | C | July 10, 2022, 6:14 p.m. | OK | PyPy 3 | TESTS | 4 | 1138 | 41676800 | ||
163598448 | Icedburger | C | July 10, 2022, 8:22 p.m. | OK | PyPy 3-64 | TESTS | 4 | 389 | 61440000 | ||
163593998 | SophieHatter | C | July 10, 2022, 7:06 p.m. | OK | PyPy 3-64 | TESTS | 4 | 389 | 73523200 | ||
163624895 | _N_0_0_B_ | C | July 11, 2022, 5:18 a.m. | OK | PyPy 3-64 | TESTS | 34 | 390 | 48025600 | ||
163599805 | pythonist_viking | C | July 10, 2022, 8:48 p.m. | OK | PyPy 3-64 | TESTS | 34 | 405 | 46592000 | ||
163598396 | Icedburger | C | July 10, 2022, 8:21 p.m. | OK | PyPy 3-64 | TESTS | 4 | 405 | 60416000 | ||
163592231 | Juanm1 | C | July 10, 2022, 6:41 p.m. | OK | PyPy 3-64 | TESTS | 4 | 436 | 43417600 | ||
163599619 | pythonist_viking | C | July 10, 2022, 8:44 p.m. | OK | PyPy 3-64 | TESTS | 34 | 451 | 47104000 | ||
163591572 | ahmedsiad | C | July 10, 2022, 6:31 p.m. | OK | PyPy 3-64 | TESTS | 4 | 483 | 55808000 | ||
163599105 | vipul_mehra | C | July 10, 2022, 8:35 p.m. | OK | PyPy 3-64 | TESTS | 4 | 529 | 64102400 | ||
163607086 | samchen123 | C | July 11, 2022, 12:23 a.m. | OK | PyPy 3-64 | TESTS | 34 | 545 | 68710400 | ||
163627322 | Lhohelhohehmm | C | July 11, 2022, 5:46 a.m. | OK | Python 3 | TESTS | 34 | 826 | 30310400 | ||
163622928 | 18pa1a0477 | C | July 11, 2022, 4:51 a.m. | OK | Python 3 | TESTS | 34 | 826 | 30310400 | ||
163598192 | abel_abate | C | July 10, 2022, 8:17 p.m. | OK | Python 3 | TESTS | 4 | 966 | 26828800 | ||
163624018 | abhinav10398 | C | July 11, 2022, 5:06 a.m. | OK | Python 3 | TESTS | 34 | 1014 | 63385600 | ||
163599057 | vipul_mehra | C | July 10, 2022, 8:34 p.m. | OK | Python 3 | TESTS | 4 | 1153 | 41472000 | ||
163595553 | amarbudhiraja | C | July 10, 2022, 7:30 p.m. | OK | Python 3 | TESTS | 4 | 1154 | 41369600 | ||
163620270 | hvbird | C | July 11, 2022, 4:10 a.m. | OK | Python 3 | TESTS | 34 | 1356 | 37683200 | ||
163609006 | hvbird | C | July 11, 2022, 1:11 a.m. | OK | Python 3 | TESTS | 34 | 1403 | 37580800 | ||
163610085 | halin | C | July 11, 2022, 1:32 a.m. | OK | Python 3 | TESTS | 34 | 1496 | 48128000 | ||
163610767 | AhmdJabr | C | July 11, 2022, 1:45 a.m. | OK | Python 3 | TESTS | 34 | 1668 | 29900800 | ||
163593156 | yaaaa2k | C | July 10, 2022, 6:54 p.m. | OK | Ruby 3 | TESTS | 4 | 1201 | 33792000 | ||
163620630 | Thallium54 | C | July 11, 2022, 4:16 a.m. | OK | Rust 2021 | TESTS | 34 | 93 | 23244800 | ||
163628552 | Sempr | C | July 11, 2022, 6 a.m. | OK | Rust 2021 | TESTS | 34 | 218 | 23449600 |
Back to search problems