Codeforces Round 604 (Div. 2)

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
1265 Codeforces Round 604 (Div. 2) FINISHED False 7200 161882687 Dec. 5, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 12830 ) B Beautiful Numbers PROGRAMMING data structures implementation math two pointers 1300

B"You are given a permutation p=[p_1, p_2, ldots, p_n] of integers from 1 to n . Let's call the number m ( 1 <= m <= n ) beautiful, if there exists two indices l, r ( 1 <= l <= r <= n ), such that the numbers [p_l, p_{l+1}, ldots, p_r] is a permutation of numbers 1, 2, ldots, m . For example, let p = [4, 5, 1, 3, 2, 6] . In this case, the numbers 1, 3, 5, 6 are beautiful and 2, 4 are not. It is because: You are given a permutation p=[p_1, p_2, ldots, p_n] . For all m ( 1 <= m <= n ) determine if it is a beautiful number or not. The first line contains the only integer t ( 1 <= t <= 1000 ) -- the number of test cases in the input. The next lines contain the description of test cases. The first line of a test case contains a number n ( 1 <= n <= 2 cdot 10^5 ) -- the length of the given permutation p . The next line contains n integers p_1, p_2, ldots, p_n ( 1 <= p_i <= n , all p_i are different) -- the given permutation p . It is guaranteed, that the sum of n from all test cases in the input doesn't exceed 2 cdot 10^5 . Print t lines -- the answers to test cases in the order they are given in the input. The answer to a test case is the string of length n , there the i -th character is equal to 1 if i is a beautiful number and is equal to 0 if i is not a beautiful number. The first test case is described in the problem statement. In the second test case all numbers from 1 to 5 are beautiful: "...

Tutorials

Codeforces Round #604 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
68386869 RyumaRyama B Jan. 8, 2020, 6:25 a.m. OK Clang++17 Diagnostics TESTS 55 109 0 1300
66615255 vjudge5 B Dec. 11, 2019, 3:12 a.m. OK Clang++17 Diagnostics TESTS 55 156 0 1300
68387050 RyumaRyama B Jan. 8, 2020, 6:32 a.m. OK Clang++17 Diagnostics TESTS 55 156 0 1300
68386515 RyumaRyama B Jan. 8, 2020, 6:13 a.m. OK Clang++17 Diagnostics TESTS 55 810 15974400 1300
68386804 RyumaRyama B Jan. 8, 2020, 6:23 a.m. OK Clang++17 Diagnostics TESTS 55 811 1024000 1300
68386657 RyumaRyama B Jan. 8, 2020, 6:18 a.m. OK Clang++17 Diagnostics TESTS 55 826 819200 1300
66340376 ruban B Dec. 5, 2019, 3:29 p.m. OK Delphi TESTS 55 93 54681600 1300
66495449 net12k44 B Dec. 8, 2019, 10:18 a.m. OK FPC TESTS 55 639 1638400 1300
66480271 kaiboy B Dec. 8, 2019, 1:36 a.m. OK GNU C11 TESTS 55 62 1024000 1300
66370519 rainboy B Dec. 5, 2019, 9:46 p.m. OK GNU C11 TESTS 55 62 1228800 1300
66360848 jschr B Dec. 5, 2019, 6:03 p.m. OK GNU C11 TESTS 55 62 1638400 1300
66481599 ShuvoMalakar B Dec. 8, 2019, 3:12 a.m. OK GNU C11 TESTS 55 639 1638400 1300
66529270 rubber_duckieOwOwO B Dec. 9, 2019, 6:53 a.m. OK GNU C11 TESTS 55 654 921600 1300
66443280 shimul_duet B Dec. 7, 2019, 8:42 a.m. OK GNU C11 TESTS 55 654 1638400 1300
66435969 Trishan B Dec. 7, 2019, 6:11 a.m. OK GNU C11 TESTS 55 654 1843200 1300
66502711 curie71 B Dec. 8, 2019, 1:10 p.m. OK GNU C11 TESTS 55 655 819200 1300
66502091 kongjiadongyuan B Dec. 8, 2019, 12:57 p.m. OK GNU C11 TESTS 55 655 819200 1300
66501611 kongjiadongyuan B Dec. 8, 2019, 12:46 p.m. OK GNU C11 TESTS 55 655 819200 1300
66376462 wenhao801 B Dec. 6, 2019, 3:05 a.m. OK GNU C++11 TESTS 55 31 819200 1300
67281339 vjudge5 B Dec. 20, 2019, 1:08 p.m. OK GNU C++11 TESTS 55 31 819200 1300
66377637 luogu_bot1 B Dec. 6, 2019, 3:55 a.m. OK GNU C++11 TESTS 55 31 1331200 1300
66372692 yuzhechuan B Dec. 5, 2019, 11:45 p.m. OK GNU C++11 TESTS 55 31 1638400 1300
66379875 Karry5307 B Dec. 6, 2019, 5:05 a.m. OK GNU C++11 TESTS 55 31 1638400 1300
66532335 zbctd B Dec. 9, 2019, 8 a.m. OK GNU C++11 TESTS 55 31 1638400 1300
66614537 luogu_bot5 B Dec. 11, 2019, 2:23 a.m. OK GNU C++11 TESTS 55 31 2252800 1300
66342283 TuanZ2z B Dec. 5, 2019, 3:35 p.m. OK GNU C++11 TESTS 55 46 614400 1300
66483375 Heartbeat666 B Dec. 8, 2019, 4:42 a.m. OK GNU C++11 TESTS 55 46 819200 1300
66383601 zhutianyijuju B Dec. 6, 2019, 6:38 a.m. OK GNU C++11 TESTS 55 46 819200 1300
66365340 tokitsukaze B Dec. 5, 2019, 7:10 p.m. OK GNU C++14 TESTS 55 31 2252800 1300
66522965 yefrigg B Dec. 9, 2019, 1:25 a.m. OK GNU C++14 TESTS 55 62 1024000 1300
66395459 sherab.yeshe B Dec. 6, 2019, 10:37 a.m. OK GNU C++14 TESTS 55 62 1024000 1300
66375677 findgirlfriend B Dec. 6, 2019, 2:32 a.m. OK GNU C++14 TESTS 55 62 1024000 1300
66416322 xpov1LL B Dec. 6, 2019, 5:14 p.m. OK GNU C++14 TESTS 55 62 1024000 1300
67077327 genotepic B Dec. 17, 2019, 2:59 p.m. OK GNU C++14 TESTS 55 62 1331200 1300
68286780 sanjayshreejain B Jan. 5, 2020, 6:50 p.m. OK GNU C++14 TESTS 55 62 1331200 1300
67772983 abhishekmallik265 B Dec. 28, 2019, 7:40 a.m. OK GNU C++14 TESTS 55 62 1331200 1300
67630841 Ujjval_patel B Dec. 26, 2019, 3:47 a.m. OK GNU C++14 TESTS 55 62 1331200 1300
67549493 Qusai_Knani B Dec. 24, 2019, 4:04 p.m. OK GNU C++14 TESTS 55 62 1331200 1300
66659248 yuruhiya B Dec. 12, 2019, 3:07 a.m. OK GNU C++17 TESTS 55 46 1024000 1300
66440111 nickluo B Dec. 7, 2019, 7:38 a.m. OK GNU C++17 TESTS 55 46 2150400 1300
66417544 ACkingdom B Dec. 6, 2019, 5:39 p.m. OK GNU C++17 TESTS 55 62 819200 1300
66620359 1525227502 B Dec. 11, 2019, 6:40 a.m. OK GNU C++17 TESTS 55 62 1331200 1300
66635032 mekg B Dec. 11, 2019, 12:36 p.m. OK GNU C++17 TESTS 55 62 1331200 1300
66660711 harsha.var B Dec. 12, 2019, 4:18 a.m. OK GNU C++17 TESTS 55 62 1331200 1300
66992122 Gleb1000 B Dec. 15, 2019, 9:10 p.m. OK GNU C++17 TESTS 55 62 1331200 1300
66394204 nayeem_bd B Dec. 6, 2019, 10:11 a.m. OK GNU C++17 TESTS 55 62 1331200 1300
66518090 Yagyu_1 B Dec. 8, 2019, 8:08 p.m. OK GNU C++17 TESTS 55 62 1331200 1300
66608305 wish_me_good B Dec. 10, 2019, 7:43 p.m. OK GNU C++17 TESTS 55 62 1331200 1300
68102034 amarjeetanand B Jan. 3, 2020, 4:08 a.m. OK Go TESTS 55 78 4505600 1300
66887460 toad123 B Dec. 14, 2019, 6:49 p.m. OK Go TESTS 55 155 0 1300
66380591 zhuaiballl B Dec. 6, 2019, 5:25 a.m. OK Go TESTS 55 155 1638400 1300
68102084 amarjeetanand B Jan. 3, 2020, 4:11 a.m. OK Go TESTS 55 171 4505600 1300
68050374 TadijaSebez B Jan. 1, 2020, 6:31 p.m. OK Go TESTS 55 218 5324800 1300
68101472 amarjeetanand B Jan. 3, 2020, 3:30 a.m. OK Go TESTS 55 779 0 1300
68101852 amarjeetanand B Jan. 3, 2020, 3:56 a.m. OK Go TESTS 55 795 0 1300
68101342 amarjeetanand B Jan. 3, 2020, 3:21 a.m. OK Go TESTS 55 842 5324800 1300
66340373 elkadymohammed01 B Dec. 5, 2019, 3:29 p.m. OK Java 11 TESTS 55 202 0 1300
66400218 Safrout B Dec. 6, 2019, 12:04 p.m. OK Java 11 TESTS 55 233 0 1300
66608313 serafimkoo B Dec. 10, 2019, 7:43 p.m. OK Java 11 TESTS 55 233 5017600 1300
66353194 yuuechka B Dec. 5, 2019, 4:17 p.m. OK Java 11 TESTS 55 234 0 1300
66490333 manuchroma B Dec. 8, 2019, 8:19 a.m. OK Java 11 TESTS 55 265 9830400 1300
66339504 Anonymous B Dec. 5, 2019, 3:26 p.m. OK Java 11 TESTS 55 280 18944000 1300
66342405 Azakarka B Dec. 5, 2019, 3:36 p.m. OK Java 11 TESTS 55 296 2355200 1300
66497465 IslamTalipovTop B Dec. 8, 2019, 11:08 a.m. OK Java 11 TESTS 55 358 8806400 1300
66610465 4erneff B Dec. 10, 2019, 9:10 p.m. OK Java 11 TESTS 55 405 0 1300
66506400 enricogi B Dec. 8, 2019, 2:36 p.m. OK Java 11 TESTS 55 405 0 1300
66417387 chojh1222 B Dec. 6, 2019, 5:36 p.m. OK Java 8 TESTS 55 140 0 1300
66402889 luchy0120 B Dec. 6, 2019, 12:48 p.m. OK Java 8 TESTS 55 140 0 1300
66365519 jakejase2 B Dec. 5, 2019, 7:15 p.m. OK Java 8 TESTS 55 140 0 1300
67382424 NormalGeek B Dec. 21, 2019, 4:45 p.m. OK Java 8 TESTS 55 155 0 1300
66347320 code_manu B Dec. 5, 2019, 3:54 p.m. OK Java 8 TESTS 55 155 0 1300
66344804 MubtasimShahriar B Dec. 5, 2019, 3:44 p.m. OK Java 8 TESTS 55 155 0 1300
66365319 di_halt B Dec. 5, 2019, 7:10 p.m. OK Java 8 TESTS 55 155 2150400 1300
66452571 OmarRadwan B Dec. 7, 2019, 12:01 p.m. OK Java 8 TESTS 55 155 2150400 1300
66439807 insane_28 B Dec. 7, 2019, 7:32 a.m. OK Java 8 TESTS 55 156 0 1300
69650694 Apurva021 B Jan. 28, 2020, 5:01 a.m. OK Java 8 TESTS 55 156 0 1300
66378145 Spheniscine B Dec. 6, 2019, 4:15 a.m. OK Kotlin TESTS 55 156 3686400 1300
66377537 Spheniscine B Dec. 6, 2019, 3:50 a.m. OK Kotlin TESTS 55 264 5017600 1300
66361770 AsuraPro B Dec. 5, 2019, 6:12 p.m. OK Kotlin TESTS 55 343 15769600 1300
66426677 cmplx-xyttmt B Dec. 6, 2019, 10:16 p.m. OK Kotlin TESTS 55 374 15974400 1300
69914343 david_varela B Jan. 31, 2020, 4:21 p.m. OK Kotlin TESTS 55 498 16691200 1300
66348759 cmplx-xyttmt B Dec. 5, 2019, 4 p.m. OK Kotlin TESTS 55 514 16076800 1300
66362201 Ahmadjon B Dec. 5, 2019, 6:17 p.m. OK Kotlin TESTS 55 530 15360000 1300
66402621 Andreeha B Dec. 6, 2019, 12:44 p.m. OK Kotlin TESTS 55 982 15564800 1300
66375311 hyzhangzhy B Dec. 6, 2019, 2:19 a.m. OK Mono C# TESTS 55 139 22016000 1300
67972581 sevimlikedicik B Dec. 30, 2019, 3:35 p.m. OK Mono C# TESTS 55 139 28160000 1300
66419957 balibalo756 B Dec. 6, 2019, 6:29 p.m. OK Mono C# TESTS 55 140 16998400 1300
66391992 artworks B Dec. 6, 2019, 9:26 a.m. OK Mono C# TESTS 55 140 28057600 1300
66338654 Jarjar314 B Dec. 5, 2019, 3:23 p.m. OK Mono C# TESTS 55 156 26726400 1300
66537928 fr0st B Dec. 9, 2019, 10:23 a.m. OK Mono C# TESTS 55 187 19865600 1300
66549869 nastya1199 B Dec. 9, 2019, 2:28 p.m. OK Mono C# TESTS 55 280 26316800 1300
66344156 dev8546 B Dec. 5, 2019, 3:42 p.m. OK Mono C# TESTS 55 311 30208000 1300
66343364 mban259 B Dec. 5, 2019, 3:39 p.m. OK Mono C# TESTS 55 405 23040000 1300
69451529 TRR B Jan. 24, 2020, 6:27 a.m. OK Mono C# TESTS 55 717 14438400 1300
69838119 2018112664jyz B Jan. 30, 2020, 12:24 p.m. OK MS C++ TESTS 55 62 1843200 1300
66483677 seh631638554 B Dec. 8, 2019, 4:57 a.m. OK MS C++ TESTS 55 77 1638400 1300
67310709 vjudge2 B Dec. 21, 2019, 2:30 a.m. OK MS C++ TESTS 55 77 2457600 1300
66446833 vjudge1 B Dec. 7, 2019, 9:58 a.m. OK MS C++ TESTS 55 78 819200 1300
68152384 vjudge4 B Jan. 4, 2020, 7:27 a.m. OK MS C++ TESTS 55 78 1638400 1300
66437342 platter B Dec. 7, 2019, 6:42 a.m. OK MS C++ TESTS 55 78 2457600 1300
66485784 vjudge4 B Dec. 8, 2019, 6:17 a.m. OK MS C++ TESTS 55 78 3174400 1300
66488651 vjudge2 B Dec. 8, 2019, 7:37 a.m. OK MS C++ TESTS 55 78 7987200 1300
66485892 vjudge2 B Dec. 8, 2019, 6:20 a.m. OK MS C++ TESTS 55 93 1638400 1300
66374569 vjudge4 B Dec. 6, 2019, 1:45 a.m. OK MS C++ TESTS 55 93 1638400 1300
66345243 ningBr B Dec. 5, 2019, 3:46 p.m. OK MS C++ 2017 TESTS 55 93 1638400 1300
66661293 GomBu B Dec. 12, 2019, 4:41 a.m. OK MS C++ 2017 TESTS 55 93 1638400 1300
67280478 vjudge2 B Dec. 20, 2019, 12:57 p.m. OK MS C++ 2017 TESTS 55 93 1843200 1300
66409702 AleksanderBalobanov B Dec. 6, 2019, 2:53 p.m. OK MS C++ 2017 TESTS 55 93 2764800 1300
66342033 Tangerine B Dec. 5, 2019, 3:34 p.m. OK MS C++ 2017 TESTS 55 93 12083200 1300
67278740 vjudge1 B Dec. 20, 2019, 12:25 p.m. OK MS C++ 2017 TESTS 55 108 1843200 1300
66389237 zhangwen123 B Dec. 6, 2019, 8:34 a.m. OK MS C++ 2017 TESTS 55 108 2457600 1300
66590014 ICEY777 B Dec. 10, 2019, 12:39 p.m. OK MS C++ 2017 TESTS 55 108 2457600 1300
69077209 VagrantAC B Jan. 19, 2020, 4:13 a.m. OK MS C++ 2017 TESTS 55 109 1638400 1300
68068443 vjudge3 B Jan. 2, 2020, 9:04 a.m. OK MS C++ 2017 TESTS 55 109 1843200 1300
66558354 shivam1420 B Dec. 9, 2019, 5:47 p.m. OK Node.js TESTS 55 280 27750400 1300
66367149 mayakin B Dec. 5, 2019, 7:54 p.m. OK PHP TESTS 55 280 22732800 1300
66608454 11fingers B Dec. 10, 2019, 7:48 p.m. OK PyPy 2 TESTS 55 202 18227200 1300
66376232 aaa_bbb_ccc B Dec. 6, 2019, 2:56 a.m. OK PyPy 2 TESTS 55 295 13721600 1300
66527996 anshuman16423 B Dec. 9, 2019, 6:10 a.m. OK PyPy 2 TESTS 55 311 19046400 1300
66363905 pranavcool4 B Dec. 5, 2019, 6:43 p.m. OK PyPy 3 TESTS 55 280 17203200 1300
66367449 chaudhary_19 B Dec. 5, 2019, 8:03 p.m. OK PyPy 3 TESTS 55 296 16691200 1300
67451352 mitribunskiy B Dec. 23, 2019, 4:27 a.m. OK PyPy 3 TESTS 55 296 18841600 1300
66371819 Jeltorotik B Dec. 5, 2019, 10:53 p.m. OK PyPy 3 TESTS 55 296 21708800 1300
66636580 Tihohon B Dec. 11, 2019, 1:09 p.m. OK PyPy 3 TESTS 55 311 15257600 1300
66381891 manish.17 B Dec. 6, 2019, 5:57 a.m. OK PyPy 3 TESTS 55 311 15769600 1300
66348274 chaudhary_19 B Dec. 5, 2019, 3:58 p.m. OK PyPy 3 TESTS 55 311 16384000 1300
66587865 Infinidrix B Dec. 10, 2019, 11:53 a.m. OK PyPy 3 TESTS 55 311 18022400 1300
66459880 lIn_nIl B Dec. 7, 2019, 2:26 p.m. OK PyPy 3 TESTS 55 311 23040000 1300
66583874 SakshamK6 B Dec. 10, 2019, 10:26 a.m. OK PyPy 3 TESTS 55 312 18227200 1300
66349930 grayGoose B Dec. 5, 2019, 4:04 p.m. OK Python 2 TESTS 55 560 19865600 1300
68109674 aniket11 B Jan. 3, 2020, 8:59 a.m. OK Python 2 TESTS 55 592 11878400 1300
66340388 Hitikkumar B Dec. 5, 2019, 3:29 p.m. OK Python 2 TESTS 55 592 16793600 1300
66411940 eban12 B Dec. 6, 2019, 3:38 p.m. OK Python 3 TESTS 55 280 13721600 1300
66668795 MehulJ B Dec. 12, 2019, 8:22 a.m. OK Python 3 TESTS 55 280 14233600 1300
66366160 LintuStorm B Dec. 5, 2019, 7:30 p.m. OK Python 3 TESTS 55 280 14233600 1300
66507735 mateuszk2001 B Dec. 8, 2019, 3:06 p.m. OK Python 3 TESTS 55 280 18432000 1300
66564259 jameshamm B Dec. 9, 2019, 8:41 p.m. OK Python 3 TESTS 55 296 18432000 1300
66412958 zbeimnet B Dec. 6, 2019, 3:59 p.m. OK Python 3 TESTS 55 312 16384000 1300
66667496 grtzsohalf B Dec. 12, 2019, 7:48 a.m. OK Python 3 TESTS 55 327 14643200 1300
66338134 iGnition13 B Dec. 5, 2019, 3:21 p.m. OK Python 3 TESTS 55 327 14643200 1300
66530016 TumsaUmata B Dec. 9, 2019, 7:18 a.m. OK Python 3 TESTS 55 327 15360000 1300
66477887 ghitakatrina07 B Dec. 7, 2019, 10:20 p.m. OK Python 3 TESTS 55 342 14233600 1300
66341451 alleycat-at-git B Dec. 5, 2019, 3:32 p.m. OK Rust TESTS 55 46 4198400 1300
66600665 abstract B Dec. 10, 2019, 4:23 p.m. OK Rust TESTS 55 62 9216000 1300
68074019 XytenSki B Jan. 2, 2020, 11:43 a.m. OK Rust TESTS 55 77 7168000 1300
68251816 smas B Jan. 5, 2020, 2:22 p.m. OK Scala TESTS 55 966 28774400 1300

remove filters

Back to search problems