Codeforces Round 717 (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
1516 Codeforces Round 717 (Div. 2) FINISHED False 7200 118340711 April 21, 2021, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4522 ) D Cut PROGRAMMING binary search data structures graphs number theory

B"This time Baby Ehab will only cut and not stick. He starts with a piece of paper with an array a of length n written on it, and then he does the following: Formally, he partitions the elements of a_l, a_{l + 1}, ldots, a_r into contiguous subarrays such that the product of every subarray is equal to its LCM. Now, for q independent ranges (l, r) , tell Baby Ehab the minimum number of subarrays he needs. The first line contains 2 integers n and q ( 1 <= n,q <= 10^5 ) -- the length of the array a and the number of queries. The next line contains n integers a_1 , a_2 , ldots , a_n ( 1 <= a_i <= 10^5 ) -- the elements of the array a . Each of the next q lines contains 2 integers l and r ( 1 <= l <= r <= n ) -- the endpoints of this query's interval. For each query, print its answer on a new line. The first query asks about the whole array. You can partition it into [2] , [3,10,7] , and [5,14] . The first subrange has product and LCM equal to 2 . The second has product and LCM equal to 210 . And the third has product and LCM equal to 70 . Another possible partitioning is [2,3] , [10,7] , and [5,14] . The second query asks about the range (2,4) . Its product is equal to its LCM, so you don't need to partition it further. The last query asks about the range (3,5) . You can partition it into [10,7] and [5] . "...

Tutorials

Codeforces round #717 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
113825424 Shironagi D April 22, 2021, 1:43 a.m. OK GNU C++11 TESTS 26 77 8499200
113792203 fishcathu. D April 21, 2021, 4:09 p.m. OK GNU C++11 TESTS 26 77 8806400
113792857 fishcathu. D April 21, 2021, 4:12 p.m. OK GNU C++11 TESTS 26 77 9113600
113825332 Shironagi D April 22, 2021, 1:40 a.m. OK GNU C++11 TESTS 26 78 8499200
113825071 Shironagi D April 22, 2021, 1:32 a.m. OK GNU C++11 TESTS 26 93 9625600
113794106 2114992323 D April 21, 2021, 4:20 p.m. OK GNU C++11 TESTS 26 93 9625600
113793945 2114992323 D April 21, 2021, 4:18 p.m. OK GNU C++11 TESTS 26 108 9625600
113791302 srijon51 D April 21, 2021, 4:04 p.m. OK GNU C++11 TESTS 26 109 1740800
113796243 reboot_restart D April 21, 2021, 4:36 p.m. OK GNU C++11 TESTS 26 109 10035200
113800352 yiq D April 21, 2021, 5:18 p.m. OK GNU C++11 TESTS 26 109 176332800
113791714 racsosabe D April 21, 2021, 4:06 p.m. OK GNU C++14 TESTS 26 140 18534400
113808183 PC_E1052 D April 21, 2021, 7 p.m. OK GNU C++14 TESTS 26 155 12697600
113831704 PrashantM D April 22, 2021, 3:53 a.m. OK GNU C++14 TESTS 26 155 15360000
113805492 Kwords D April 21, 2021, 6:25 p.m. OK GNU C++14 TESTS 26 155 15974400
113790682 nikolapesic2802 D April 21, 2021, 4:02 p.m. OK GNU C++14 TESTS 26 156 8396800
113848201 Tlopex D April 22, 2021, 5:35 a.m. OK GNU C++14 TESTS 26 156 12800000
113810081 abdelrahman011 D April 21, 2021, 7:26 p.m. OK GNU C++14 TESTS 26 156 12800000
113807168 mufeng.wei D April 21, 2021, 6:47 p.m. OK GNU C++14 TESTS 26 171 7884800
113830804 nandonathaniel D April 22, 2021, 3:38 a.m. OK GNU C++14 TESTS 26 171 7987200
113828303 Kayaking D April 22, 2021, 2:53 a.m. OK GNU C++14 TESTS 26 171 8806400
113799344 saurabh_prince D April 21, 2021, 5:06 p.m. OK GNU C++17 TESTS 26 124 10854400
113825323 lyyyyy D April 22, 2021, 1:39 a.m. OK GNU C++17 TESTS 26 124 117248000
113800632 arujbansal D April 21, 2021, 5:21 p.m. OK GNU C++17 TESTS 26 139 12902400
113823595 KrK D April 22, 2021, 12:46 a.m. OK GNU C++17 TESTS 26 140 9216000
113801457 purinliang D April 21, 2021, 5:31 p.m. OK GNU C++17 TESTS 26 140 9216000
113817128 MvKaio D April 21, 2021, 9:38 p.m. OK GNU C++17 TESTS 26 140 11878400
113830186 morty D April 22, 2021, 3:27 a.m. OK GNU C++17 TESTS 26 155 9728000
113799924 lucasturci D April 21, 2021, 5:13 p.m. OK GNU C++17 TESTS 26 155 9728000
113800698 arujbansal D April 21, 2021, 5:22 p.m. OK GNU C++17 TESTS 26 155 12902400
113829047 Devour_ D April 22, 2021, 3:07 a.m. OK GNU C++17 TESTS 26 155 13721600
113807457 EIKOU D April 21, 2021, 6:50 p.m. OK GNU C++17 (64) TESTS 26 109 7782400
113799323 Vax D April 21, 2021, 5:06 p.m. OK GNU C++17 (64) TESTS 26 109 8908800
113807423 EIKOU D April 21, 2021, 6:50 p.m. OK GNU C++17 (64) TESTS 26 124 7782400
113793890 vonat1us D April 21, 2021, 4:18 p.m. OK GNU C++17 (64) TESTS 26 124 8806400
113798992 agul D April 21, 2021, 5:02 p.m. OK GNU C++17 (64) TESTS 26 139 9011200
113818554 czhang2718 D April 21, 2021, 10:18 p.m. OK GNU C++17 (64) TESTS 26 139 9420800
113808468 ankurkayal D April 21, 2021, 7:04 p.m. OK GNU C++17 (64) TESTS 26 139 13107200
113808350 ScarletS D April 21, 2021, 7:02 p.m. OK GNU C++17 (64) TESTS 26 140 7577600
113807282 EIKOU D April 21, 2021, 6:48 p.m. OK GNU C++17 (64) TESTS 26 140 7782400
113820483 PandemicP D April 21, 2021, 11:18 p.m. OK GNU C++17 (64) TESTS 26 140 8908800
113810851 0x3F D April 21, 2021, 7:38 p.m. OK Go TESTS 26 109 15769600
113810712 0x3F D April 21, 2021, 7:35 p.m. OK Go TESTS 26 124 15769600
113791589 0x3F D April 21, 2021, 4:05 p.m. OK Go TESTS 26 249 15769600
113846746 142 D April 22, 2021, 5:13 a.m. OK Java 11 TESTS 26 436 16793600
113797111 yehara D April 21, 2021, 4:44 p.m. OK Java 11 TESTS 26 826 36044800
113826028 tiwariabhishek D April 22, 2021, 2:01 a.m. OK Java 8 TESTS 26 265 16486400
113816572 hu_tao D April 21, 2021, 9:25 p.m. OK Java 8 TESTS 26 280 5120000
113824641 NatInTheHat D April 22, 2021, 1:18 a.m. OK Java 8 TESTS 26 608 26931200
113792891 Agnimandur D April 21, 2021, 4:12 p.m. OK Java 8 TESTS 26 685 19148800
113799555 martins D April 21, 2021, 5:09 p.m. OK Java 8 TESTS 26 842 90521600
113815507 P___ D April 21, 2021, 9:01 p.m. OK MS C++ 2017 TESTS 26 234 11980800
113816236 b99202050 D April 21, 2021, 9:17 p.m. OK PyPy 3 TESTS 26 468 19046400
113815682 b99202050 D April 21, 2021, 9:05 p.m. OK PyPy 3 TESTS 26 498 24371200
113797330 at_f D April 21, 2021, 4:46 p.m. OK PyPy 3 TESTS 26 499 37990400
113816270 b99202050 D April 21, 2021, 9:17 p.m. OK PyPy 3 TESTS 26 514 22835200
113815572 b99202050 D April 21, 2021, 9:02 p.m. OK PyPy 3 TESTS 26 514 37888000
113813433 colicon D April 21, 2021, 8:21 p.m. OK PyPy 3 TESTS 26 576 23244800
113832396 titia D April 22, 2021, 4:05 a.m. OK PyPy 3 TESTS 26 826 26009600
113848254 ayaoni D April 22, 2021, 5:36 a.m. OK PyPy 3 TESTS 26 841 31846400
113791833 marroncastle D April 21, 2021, 4:07 p.m. OK PyPy 3 TESTS 26 951 61132800
113787531 marroncastle D April 21, 2021, 3:32 p.m. OK PyPy 3 TESTS 26 982 60825600
113794689 toomer D April 21, 2021, 4:24 p.m. OK Rust TESTS 26 124 11161600

remove filters

Back to search problems