Hello 2020

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
1284 Hello 2020 FINISHED False 9000 153683699 Jan. 4, 2020, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10861 ) B New Year and Ascent Sequence PROGRAMMING binary search combinatorics data structures dp implementation sortings 1500

B"A sequence a = [a_1, a_2, ldots, a_l] of length l has an ascent if there exists a pair of indices (i, j) such that 1 <= i < j <= l and a_i < a_j . For example, the sequence [0, 2, 0, 2, 0] has an ascent because of the pair (1, 4) , but the sequence [4, 3, 3, 3, 1] doesn't have an ascent. Let's call a concatenation of sequences p and q the sequence that is obtained by writing down sequences p and q one right after another without changing the order. For example, the concatenation of the [0, 2, 0, 2, 0] and [4, 3, 3, 3, 1] is the sequence [0, 2, 0, 2, 0, 4, 3, 3, 3, 1] . The concatenation of sequences p and q is denoted as p+q . Gyeonggeun thinks that sequences with ascents bring luck. Therefore, he wants to make many such sequences for the new year. Gyeonggeun has n sequences s_1, s_2, ldots, s_n which may have different lengths. Gyeonggeun will consider all n^2 pairs of sequences s_x and s_y ( 1 <= x, y <= n ), and will check if its concatenation s_x + s_y has an ascent. Note that he may select the same sequence twice, and the order of selection matters. Please count the number of pairs ( x, y ) of sequences s_1, s_2, ldots, s_n whose concatenation s_x + s_y contains an ascent. The first line contains the number n ( 1 <= n <= 100 ,000 ) denoting the number of sequences. The next n lines contain the number l_i ( 1 <= l_i ) denoting the length of s_i , followed by l_i integers s_{i, 1}, s_{i, 2}, ldots, s_{i, l_i} ( 0 <= s_{i, j} <= 10^6 ) denoting the sequence s_i . It is guaranteed that the sum of all l_i does not exceed 100 ,000 . Print a single integer, the number of pairs of sequences whose concatenation has an ascent. For the first example, the following 9 arrays have an ascent: [1, 2], [1, 2], [1, 3], [1, 3],"...

Tutorials

Hello 2020 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68169420 hos.lyric B Jan. 4, 2020, 12:16 p.m. OK D TESTS 72 93 23961600 1500
68173964 Gassa B Jan. 4, 2020, 12:29 p.m. OK D TESTS 72 124 11776000 1500
68182620 daut-dlang B Jan. 4, 2020, 1:08 p.m. OK D TESTS 72 155 11776000 1500
68174806 iica B Jan. 4, 2020, 12:32 p.m. OK D TESTS 72 217 36454400 1500
68207420 ruban B Jan. 4, 2020, 5:54 p.m. OK Delphi TESTS 72 62 84684800 1500
68193439 baezilisK B Jan. 4, 2020, 2:07 p.m. OK GNU C11 TESTS 72 62 819200 1500
69054131 kaname_madoka123 B Jan. 18, 2020, 1:48 p.m. OK GNU C11 TESTS 72 62 819200 1500
68185310 YOK B Jan. 4, 2020, 1:22 p.m. OK GNU C11 TESTS 72 62 2560000 1500
68190533 kernel.bin B Jan. 4, 2020, 1:50 p.m. OK GNU C11 TESTS 72 62 11980800 1500
68175365 pengin_2000 B Jan. 4, 2020, 12:34 p.m. OK GNU C11 TESTS 72 62 11980800 1500
68464669 k_diduk B Jan. 9, 2020, 7:39 p.m. OK GNU C11 TESTS 72 77 819200 1500
68212216 thegreatkwanghyeon B Jan. 4, 2020, 7:59 p.m. OK GNU C11 TESTS 72 77 2048000 1500
68171622 physics0523 B Jan. 4, 2020, 12:21 p.m. OK GNU C11 TESTS 72 77 22425600 1500
68232608 Trinadh724 B Jan. 5, 2020, 9:46 a.m. OK GNU C11 TESTS 72 77 40038400 1500
68464896 k_diduk B Jan. 9, 2020, 7:46 p.m. OK GNU C11 TESTS 72 78 819200 1500
69462788 zxynothing B Jan. 24, 2020, 11:33 a.m. OK GNU C++11 TESTS 72 31 4812800 1500
68175728 guoyifan B Jan. 4, 2020, 12:36 p.m. OK GNU C++11 TESTS 72 31 4812800 1500
68962590 20220156 B Jan. 17, 2020, 2:24 a.m. OK GNU C++11 TESTS 72 31 5120000 1500
68962572 20220156 B Jan. 17, 2020, 2:23 a.m. OK GNU C++11 TESTS 72 31 5120000 1500
68173057 poaspoas B Jan. 4, 2020, 12:26 p.m. OK GNU C++11 TESTS 72 31 5222400 1500
68234719 sun_of_Ice B Jan. 5, 2020, 10:31 a.m. OK GNU C++11 TESTS 72 31 5324800 1500
68174071 Sneakoscope B Jan. 4, 2020, 12:29 p.m. OK GNU C++11 TESTS 72 31 7372800 1500
68314262 Frame233 B Jan. 6, 2020, 12:35 p.m. OK GNU C++11 TESTS 72 31 7782400 1500
68214820 jgy002 B Jan. 4, 2020, 9:58 p.m. OK GNU C++11 TESTS 72 31 8396800 1500
68219236 luogu_bot3 B Jan. 5, 2020, 3:18 a.m. OK GNU C++11 TESTS 72 31 9011200 1500
68171980 Linkus B Jan. 4, 2020, 12:22 p.m. OK GNU C++14 TESTS 72 46 5632000 1500
68297362 wleung_bvg B Jan. 6, 2020, 4:01 a.m. OK GNU C++14 TESTS 72 46 7270400 1500
68170109 QAQAutoMaton B Jan. 4, 2020, 12:17 p.m. OK GNU C++14 TESTS 72 46 10240000 1500
68174422 disangan233 B Jan. 4, 2020, 12:31 p.m. OK GNU C++14 TESTS 72 46 18227200 1500
68398436 jkprajapati B Jan. 8, 2020, 12:08 p.m. OK GNU C++14 TESTS 72 61 2048000 1500
68173631 tokitsukaze B Jan. 4, 2020, 12:28 p.m. OK GNU C++14 TESTS 72 61 2048000 1500
68185715 vishnu_m B Jan. 4, 2020, 1:24 p.m. OK GNU C++14 TESTS 72 61 3788800 1500
68204863 860579 B Jan. 4, 2020, 5:03 p.m. OK GNU C++14 TESTS 72 61 11059200 1500
68363840 Sp1tfire B Jan. 7, 2020, 3:09 p.m. OK GNU C++14 TESTS 72 62 921600 1500
68170329 natsugiri B Jan. 4, 2020, 12:18 p.m. OK GNU C++14 TESTS 72 62 1433600 1500
68174507 IgorSmirnov B Jan. 4, 2020, 12:31 p.m. OK GNU C++17 TESTS 72 46 2969600 1500
68170315 HirasawaaYui B Jan. 4, 2020, 12:18 p.m. OK GNU C++17 TESTS 72 46 5324800 1500
68175732 CQXYM B Jan. 4, 2020, 12:36 p.m. OK GNU C++17 TESTS 72 61 1433600 1500
68437927 JeremyMo B Jan. 9, 2020, 9:43 a.m. OK GNU C++17 TESTS 72 61 1945600 1500
68767882 vjudge1 B Jan. 14, 2020, 10:38 a.m. OK GNU C++17 TESTS 72 61 4812800 1500
68171628 hoke_t B Jan. 4, 2020, 12:21 p.m. OK GNU C++17 TESTS 72 62 921600 1500
68176415 _Rebellion B Jan. 4, 2020, 12:39 p.m. OK GNU C++17 TESTS 72 62 1228800 1500
68962990 TinkerX B Jan. 17, 2020, 2:46 a.m. OK GNU C++17 TESTS 72 62 1228800 1500
69212520 Leonardo_Blanger B Jan. 20, 2020, 8:57 p.m. OK GNU C++17 TESTS 72 62 1228800 1500
68393499 dhr_1 B Jan. 8, 2020, 9:49 a.m. OK GNU C++17 TESTS 72 62 1331200 1500
68352627 peakle B Jan. 7, 2020, 10:36 a.m. OK Go TESTS 72 93 4608000 1500
68227880 regotiss B Jan. 5, 2020, 7:57 a.m. OK Go TESTS 72 93 5324800 1500
68175605 synapse B Jan. 4, 2020, 12:35 p.m. OK Go TESTS 72 186 4505600 1500
68197854 godsdice B Jan. 4, 2020, 2:30 p.m. OK Go TESTS 72 202 4505600 1500
68238580 insert_cool_handle B Jan. 5, 2020, 11:57 a.m. OK Java 11 TESTS 72 217 6963200 1500
68232899 rohan101 B Jan. 5, 2020, 9:52 a.m. OK Java 11 TESTS 72 233 716800 1500
68180755 pikapika00 B Jan. 4, 2020, 12:59 p.m. OK Java 11 TESTS 72 249 614400 1500
68177776 DimaTomsk B Jan. 4, 2020, 12:45 p.m. OK Java 11 TESTS 72 249 614400 1500
68169706 eatmore B Jan. 4, 2020, 12:16 p.m. OK Java 11 TESTS 72 249 614400 1500
68180486 zhanyi_xiaolu B Jan. 4, 2020, 12:58 p.m. OK Java 11 TESTS 72 249 716800 1500
68293349 rohithsajith B Jan. 5, 2020, 11:39 p.m. OK Java 11 TESTS 72 249 819200 1500
68189353 about B Jan. 4, 2020, 1:44 p.m. OK Java 11 TESTS 72 249 3379200 1500
68171211 mikit B Jan. 4, 2020, 12:20 p.m. OK Java 11 TESTS 72 280 716800 1500
68177485 avijit_agarwal B Jan. 4, 2020, 12:44 p.m. OK Java 11 TESTS 72 280 1638400 1500
68235954 luchy0120 B Jan. 5, 2020, 10:57 a.m. OK Java 8 TESTS 72 124 0 1500
68203658 saurabhs1206 B Jan. 4, 2020, 4:43 p.m. OK Java 8 TESTS 72 124 0 1500
68350879 bluesky111 B Jan. 7, 2020, 9:46 a.m. OK Java 8 TESTS 72 139 4915200 1500
68216055 mTvTm B Jan. 4, 2020, 11:28 p.m. OK Java 8 TESTS 72 140 0 1500
68202557 wabadabakalakaboo B Jan. 4, 2020, 4:28 p.m. OK Java 8 TESTS 72 140 0 1500
68180869 ShesMyNerd B Jan. 4, 2020, 1 p.m. OK Java 8 TESTS 72 140 0 1500
68180449 xwchen B Jan. 4, 2020, 12:58 p.m. OK Java 8 TESTS 72 140 0 1500
68210499 yash49 B Jan. 4, 2020, 7:06 p.m. OK Java 8 TESTS 72 140 102400 1500
68210904 code_manu B Jan. 4, 2020, 7:18 p.m. OK Java 8 TESTS 72 140 3788800 1500
68197140 In_The_Name_Of_Love B Jan. 4, 2020, 2:26 p.m. OK Java 8 TESTS 72 140 7475200 1500
68297143 Spheniscine B Jan. 6, 2020, 3:49 a.m. OK Kotlin TESTS 72 218 1638400 1500
68297173 Spheniscine B Jan. 6, 2020, 3:51 a.m. OK Kotlin TESTS 72 233 1536000 1500
68296064 Spheniscine B Jan. 6, 2020, 2:50 a.m. OK Kotlin TESTS 72 249 1638400 1500
68173524 knightL B Jan. 4, 2020, 12:28 p.m. OK Kotlin TESTS 72 342 9011200 1500
68168112 Tlatoani B Jan. 4, 2020, 12:13 p.m. OK Kotlin TESTS 72 343 2560000 1500
68180070 seirion B Jan. 4, 2020, 12:56 p.m. OK Kotlin TESTS 72 389 6451200 1500
68177775 cmplx-xyttmt B Jan. 4, 2020, 12:45 p.m. OK Kotlin TESTS 72 499 40960000 1500
68188585 bulkasmakom B Jan. 4, 2020, 1:39 p.m. OK Kotlin TESTS 72 841 6656000 1500
68177964 mban259 B Jan. 4, 2020, 12:46 p.m. OK Mono C# TESTS 72 155 9728000 1500
68175339 hibatibati B Jan. 4, 2020, 12:34 p.m. OK Mono C# TESTS 72 155 13004800 1500
68174390 plasma-effect B Jan. 4, 2020, 12:31 p.m. OK Mono C# TESTS 72 155 14336000 1500
68175700 EmK B Jan. 4, 2020, 12:36 p.m. OK Mono C# TESTS 72 156 20275200 1500
68181825 sergmel B Jan. 4, 2020, 1:04 p.m. OK Mono C# TESTS 72 171 11878400 1500
68177390 DM7PvTyc B Jan. 4, 2020, 12:43 p.m. OK Mono C# TESTS 72 171 15872000 1500
68172769 keymoon B Jan. 4, 2020, 12:25 p.m. OK Mono C# TESTS 72 374 16486400 1500
68237089 Maks95Ivanovo B Jan. 5, 2020, 11:23 a.m. OK Mono C# TESTS 72 420 20684800 1500
68191190 Anastasiya_Andreevna B Jan. 4, 2020, 1:54 p.m. OK Mono C# TESTS 72 452 14233600 1500
68770251 vjudge4 B Jan. 14, 2020, 11:35 a.m. OK MS C++ TESTS 72 62 1638400 1500
68180328 Volja B Jan. 4, 2020, 12:57 p.m. OK MS C++ TESTS 72 62 1638400 1500
68174895 wa1tz719 B Jan. 4, 2020, 12:32 p.m. OK MS C++ TESTS 72 62 1740800 1500
68175101 tarattata1 B Jan. 4, 2020, 12:33 p.m. OK MS C++ TESTS 72 62 2150400 1500
68768200 vjudge5 B Jan. 14, 2020, 10:46 a.m. OK MS C++ TESTS 72 62 4915200 1500
68218526 vjudge5 B Jan. 5, 2020, 2:39 a.m. OK MS C++ TESTS 72 62 5222400 1500
68771339 vjudge5 B Jan. 14, 2020, 11:58 a.m. OK MS C++ TESTS 72 62 7987200 1500
68767377 vjudge3 B Jan. 14, 2020, 10:27 a.m. OK MS C++ TESTS 72 62 9216000 1500
68975175 vjudge2 B Jan. 17, 2020, 8:32 a.m. OK MS C++ TESTS 72 77 2150400 1500
68174753 Denx24x B Jan. 4, 2020, 12:32 p.m. OK MS C++ TESTS 72 77 3481600 1500
68195778 Conan73 B Jan. 4, 2020, 2:19 p.m. OK MS C++ 2017 TESTS 72 62 5836800 1500
68204293 AleksanderBalobanov B Jan. 4, 2020, 4:53 p.m. OK MS C++ 2017 TESTS 72 77 9318400 1500
68183595 ZA139 B Jan. 4, 2020, 1:13 p.m. OK MS C++ 2017 TESTS 72 77 201523200 1500
68239671 GomBu B Jan. 5, 2020, 12:20 p.m. OK MS C++ 2017 TESTS 72 78 1843200 1500
68608482 varsha_18524 B Jan. 11, 2020, 2:51 p.m. OK MS C++ 2017 TESTS 72 78 2048000 1500
68658963 sudha_18501 B Jan. 12, 2020, 1:03 p.m. OK MS C++ 2017 TESTS 72 78 2048000 1500
68641848 18wh1a0546 B Jan. 12, 2020, 7:46 a.m. OK MS C++ 2017 TESTS 72 78 2048000 1500
68228458 pichulia B Jan. 5, 2020, 8:12 a.m. OK MS C++ 2017 TESTS 72 78 16076800 1500
68194712 IvyLH03 B Jan. 4, 2020, 2:14 p.m. OK MS C++ 2017 TESTS 72 93 1228800 1500
68204016 Sleepymint B Jan. 4, 2020, 4:49 p.m. OK MS C++ 2017 TESTS 72 93 1228800 1500
68173657 MVP B Jan. 4, 2020, 12:28 p.m. OK PyPy 2 TESTS 72 234 9728000 1500
68202345 raj1307 B Jan. 4, 2020, 4:26 p.m. OK PyPy 2 TESTS 72 265 18739200 1500
68176860 _kawaii_neko_ B Jan. 4, 2020, 12:41 p.m. OK PyPy 2 TESTS 72 280 13926400 1500
68178244 Kevin_Tang B Jan. 4, 2020, 12:47 p.m. OK PyPy 2 TESTS 72 296 15769600 1500
68180113 iamprayush B Jan. 4, 2020, 12:56 p.m. OK PyPy 2 TESTS 72 374 14336000 1500
68173164 Mukundan314 B Jan. 4, 2020, 12:26 p.m. OK PyPy 2 TESTS 72 404 8192000 1500
68216610 abc_1988_1106 B Jan. 5, 2020, 12:15 a.m. OK PyPy 2 TESTS 72 701 14848000 1500
68372613 HarendraSingh22 B Jan. 7, 2020, 6:18 p.m. OK PyPy 2 TESTS 72 732 13004800 1500
68177665 pengyuhe B Jan. 4, 2020, 12:45 p.m. OK PyPy 2 TESTS 72 763 12083200 1500
68179110 garyg1 B Jan. 4, 2020, 12:51 p.m. OK PyPy 2 TESTS 72 764 9216000 1500
68555306 m.ni B Jan. 10, 2020, 4:58 p.m. OK PyPy 3 TESTS 72 280 9318400 1500
68180667 FLOP B Jan. 4, 2020, 12:59 p.m. OK PyPy 3 TESTS 72 295 9932800 1500
68412919 sureshsinghspd B Jan. 8, 2020, 5:42 p.m. OK PyPy 3 TESTS 72 295 10547200 1500
68234682 xiema B Jan. 5, 2020, 10:30 a.m. OK PyPy 3 TESTS 72 296 10240000 1500
68184789 vit_72 B Jan. 4, 2020, 1:19 p.m. OK PyPy 3 TESTS 72 311 9728000 1500
68177071 vinuthegr8 B Jan. 4, 2020, 12:42 p.m. OK PyPy 3 TESTS 72 311 9830400 1500
68172954 Kiri8128 B Jan. 4, 2020, 12:26 p.m. OK PyPy 3 TESTS 72 311 14131200 1500
68230674 pineriver B Jan. 5, 2020, 9:04 a.m. OK PyPy 3 TESTS 72 311 19456000 1500
68841595 codershuvo B Jan. 15, 2020, 5:59 a.m. OK PyPy 3 TESTS 72 327 15667200 1500
68174866 nagitaosu B Jan. 4, 2020, 12:32 p.m. OK PyPy 3 TESTS 72 327 666214400 1500
68210158 youssef93 B Jan. 4, 2020, 6:57 p.m. OK Python 2 TESTS 72 530 5734400 1500
68429001 soumyasarkar1998 B Jan. 9, 2020, 5:47 a.m. OK Python 2 TESTS 72 561 5632000 1500
68180790 ekali B Jan. 4, 2020, 12:59 p.m. OK Python 2 TESTS 72 608 5632000 1500
68171635 nwi B Jan. 4, 2020, 12:21 p.m. OK Python 2 TESTS 72 623 20480000 1500
68187136 clandestine_ B Jan. 4, 2020, 1:32 p.m. OK Python 2 TESTS 72 654 10649600 1500
68180742 ChaosL B Jan. 4, 2020, 12:59 p.m. OK Python 2 TESTS 72 748 11776000 1500
68173704 lijianghan B Jan. 4, 2020, 12:28 p.m. OK Python 2 TESTS 72 1060 8192000 1500
68224538 h8191 B Jan. 5, 2020, 6:33 a.m. OK Python 3 TESTS 72 420 7680000 1500
68186785 ryo_n B Jan. 4, 2020, 1:30 p.m. OK Python 3 TESTS 72 421 7372800 1500
68199108 agw02010 B Jan. 4, 2020, 2:34 p.m. OK Python 3 TESTS 72 467 7372800 1500
68203784 eugalt B Jan. 4, 2020, 4:45 p.m. OK Python 3 TESTS 72 499 7475200 1500
68213736 FlyingBag65 B Jan. 4, 2020, 9:01 p.m. OK Python 3 TESTS 72 514 7372800 1500
68179877 Danish_love B Jan. 4, 2020, 12:55 p.m. OK Python 3 TESTS 72 514 7680000 1500
68178264 vinayakawanti B Jan. 4, 2020, 12:47 p.m. OK Python 3 TESTS 72 530 7372800 1500
68240375 mosendz B Jan. 5, 2020, 12:34 p.m. OK Python 3 TESTS 72 530 7680000 1500
68225531 amangupt01 B Jan. 5, 2020, 6:58 a.m. OK Python 3 TESTS 72 530 8089600 1500
68187759 mike.shvets B Jan. 4, 2020, 1:35 p.m. OK Python 3 TESTS 72 530 8089600 1500
68241206 ten- B Jan. 5, 2020, 12:52 p.m. OK Rust TESTS 72 62 2560000 1500
68173011 tuna_salad B Jan. 4, 2020, 12:26 p.m. OK Rust TESTS 72 62 4096000 1500
68186680 manta1130 B Jan. 4, 2020, 1:29 p.m. OK Rust TESTS 72 93 2252800 1500
68440738 Lancern B Jan. 9, 2020, 10:51 a.m. OK Rust TESTS 72 93 4403200 1500
68178253 terraformer B Jan. 4, 2020, 12:47 p.m. OK Rust TESTS 72 108 6246400 1500
68175903 ichyo B Jan. 4, 2020, 12:37 p.m. OK Rust TESTS 72 124 2764800 1500
68178911 limed B Jan. 4, 2020, 12:51 p.m. OK Scala TESTS 72 670 6656000 1500

remove filters

Back to search problems