Codeforces Round 816 (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
1715 Codeforces Round 816 (Div. 2) FINISHED False 8100 76260262 Aug. 20, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8800 ) C Monoblock PROGRAMMING brute force combinatorics data structures divide and conquer greedy implementation

B'Stanley has decided to buy a new desktop PC made by the company "Monoblock", and to solve captcha on their website, he needs to solve the following task. The awesomeness of an array is the minimum number of blocks of consecutive identical numbers in which the array could be split. For example, the awesomeness of an array You are given an array a of length n . There are m queries of two integers i , x . A query i , x means that from now on the i -th element of the array a is equal to x . After each query print the sum of awesomeness values among all subsegments of array a . In other words, after each query you need to calculate sum limits_{l = 1}^n sum limits_{r = l}^n g(l, r), where g(l, r) is the awesomeness of the array b = [a_l, a_{l + 1}, ldots, a_r] . In the first line you are given with two integers n and m ( 1 <= q n, m <= q 10^5 ). The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ) -- the array a . In the next m lines you are given the descriptions of queries. Each line contains two integers i and x ( 1 <= q i <= q n , 1 <= q x <= q 10^9 ). Print the answer to each query on a new line. After the first query a is equal to [1, 2, 2, 4, 5] , and the answer is 29 because we can split each of the subsegments the following way: '...

Tutorials

Codeforces Round #816 (Div. 2) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
169236417 6-_-9 C Aug. 21, 2022, 12:34 p.m. OK C# 10 TESTS 35 202 30105600
169191579 Tdyx C Aug. 21, 2022, 2:39 a.m. OK C# 8 TESTS 35 156 20992000
169378766 FatalityNT C Aug. 22, 2022, 10:36 p.m. OK C# 8 TESTS 35 733 14745600
169227050 NenadDapic C Aug. 21, 2022, 10:54 a.m. OK FPC TESTS 35 390 409600
169246146 keerthanareddy123 C Aug. 21, 2022, 2:17 p.m. OK GNU C11 TESTS 35 530 409600
169346380 Tom66 C Aug. 22, 2022, 2:53 p.m. OK GNU C++14 TESTS 35 78 1638400
169363453 dsabolic C Aug. 22, 2022, 5:57 p.m. OK GNU C++14 TESTS 35 109 409600
169335394 lenzer C Aug. 22, 2022, 1:01 p.m. OK GNU C++14 TESTS 35 109 409600
169308747 SoiMae C Aug. 22, 2022, 8:07 a.m. OK GNU C++14 TESTS 35 109 409600
169287345 bucket_xv C Aug. 22, 2022, 1:37 a.m. OK GNU C++14 TESTS 35 109 409600
169286011 Leasier C Aug. 22, 2022, 1:02 a.m. OK GNU C++14 TESTS 35 109 409600
169285222 lingying C Aug. 22, 2022, 12:33 a.m. OK GNU C++14 TESTS 35 109 409600
169237189 TanJI C Aug. 21, 2022, 12:43 p.m. OK GNU C++14 TESTS 35 109 409600
169206363 Redamancy-lyj C Aug. 21, 2022, 6:55 a.m. OK GNU C++14 TESTS 35 109 409600
169380974 IPJ C Aug. 22, 2022, 11:55 p.m. OK GNU C++14 TESTS 35 109 409600
169253338 whispclh C Aug. 21, 2022, 3:34 p.m. OK GNU C++17 TESTS 35 108 819200
169216917 boatmuscles C Aug. 21, 2022, 9:07 a.m. OK GNU C++17 TESTS 35 109 409600
169300301 VIH C Aug. 22, 2022, 6:13 a.m. OK GNU C++17 TESTS 35 109 1228800
169192506 SajibKC_19 C Aug. 21, 2022, 3 a.m. OK GNU C++17 TESTS 35 109 3174400
169248759 bugdone C Aug. 21, 2022, 2:46 p.m. OK GNU C++17 TESTS 35 124 409600
169214957 _Yume_ C Aug. 21, 2022, 8:45 a.m. OK GNU C++17 TESTS 35 124 409600
169191418 Epilogue C Aug. 21, 2022, 2:36 a.m. OK GNU C++17 TESTS 35 124 409600
169187684 Asd_Orin C Aug. 21, 2022, 1:09 a.m. OK GNU C++17 TESTS 35 124 409600
169293917 lyuzlion C Aug. 22, 2022, 4:09 a.m. OK GNU C++17 TESTS 35 124 409600
169268237 asiseno2 C Aug. 21, 2022, 6:17 p.m. OK GNU C++17 TESTS 35 124 614400
169233652 TrendBattles C Aug. 21, 2022, 12:04 p.m. OK GNU C++17 (64) TESTS 35 77 409600
169385868 wonderful_trip C Aug. 23, 2022, 3:26 a.m. OK GNU C++17 (64) TESTS 35 77 819200
169332629 Kosmo00 C Aug. 22, 2022, 12:31 p.m. OK GNU C++17 (64) TESTS 35 78 409600
169295327 jose_0222 C Aug. 22, 2022, 4:42 a.m. OK GNU C++17 (64) TESTS 35 78 819200
169279300 Xc4l16r3 C Aug. 21, 2022, 9:17 p.m. OK GNU C++17 (64) TESTS 35 78 819200
169253606 RohitRKS C Aug. 21, 2022, 3:37 p.m. OK GNU C++17 (64) TESTS 35 78 819200
169188323 DjTang C Aug. 21, 2022, 1:26 a.m. OK GNU C++17 (64) TESTS 35 78 819200
169202785 leo22 C Aug. 21, 2022, 6:06 a.m. OK GNU C++17 (64) TESTS 35 78 1228800
169309892 cjnwq C Aug. 22, 2022, 8:20 a.m. OK GNU C++17 (64) TESTS 35 92 819200
169321373 Win_Handsome C Aug. 22, 2022, 10:27 a.m. OK GNU C++17 (64) TESTS 35 92 819200
169340860 MiaomiaoZi C Aug. 22, 2022, 1:57 p.m. OK GNU C++20 (64) TESTS 35 62 409600
169304841 Riladavin C Aug. 22, 2022, 7:18 a.m. OK GNU C++20 (64) TESTS 35 62 409600
169269445 Arturoku C Aug. 21, 2022, 6:30 p.m. OK GNU C++20 (64) TESTS 35 62 409600
169258919 koloskov25 C Aug. 21, 2022, 4:34 p.m. OK GNU C++20 (64) TESTS 35 62 409600
169249615 cotato C Aug. 21, 2022, 2:55 p.m. OK GNU C++20 (64) TESTS 35 62 409600
169235420 Tawes C Aug. 21, 2022, 12:24 p.m. OK GNU C++20 (64) TESTS 35 62 409600
169217681 Kidding_M C Aug. 21, 2022, 9:15 a.m. OK GNU C++20 (64) TESTS 35 62 409600
169212978 RelaxL C Aug. 21, 2022, 8:20 a.m. OK GNU C++20 (64) TESTS 35 62 409600
169388510 _QWS_ C Aug. 23, 2022, 5:24 a.m. OK GNU C++20 (64) TESTS 35 62 409600
169379593 arnavsrivastava0123 C Aug. 22, 2022, 11:04 p.m. OK GNU C++20 (64) TESTS 35 62 409600
169369987 koqo C Aug. 22, 2022, 7:24 p.m. OK Go TESTS 35 234 4710400
169271406 nbhakar C Aug. 21, 2022, 6:55 p.m. OK Java 11 TESTS 35 280 0
169285861 gurkaran_s C Aug. 22, 2022, 12:56 a.m. OK Java 11 TESTS 35 295 0
169238872 Jeg C Aug. 21, 2022, 1:01 p.m. OK Java 11 TESTS 35 295 0
169195318 aditya2024 C Aug. 21, 2022, 3:57 a.m. OK Java 11 TESTS 35 295 0
169223795 Prime369 C Aug. 21, 2022, 10:19 a.m. OK Java 11 TESTS 35 296 2457600
169339986 gaju321 C Aug. 22, 2022, 1:48 p.m. OK Java 11 TESTS 35 311 0
169270588 singhshivsm20001 C Aug. 21, 2022, 6:45 p.m. OK Java 11 TESTS 35 311 0
169255970 sejur224 C Aug. 21, 2022, 4:03 p.m. OK Java 11 TESTS 35 311 40345600
169234582 amanraj01 C Aug. 21, 2022, 12:14 p.m. OK Java 11 TESTS 35 389 36147200
169320660 prateek.rai_cs19 C Aug. 22, 2022, 10:18 a.m. OK Java 11 TESTS 35 452 0
169296983 Mamimi C Aug. 22, 2022, 5:16 a.m. OK Java 17 TESTS 35 312 614400
169286369 matzhao C Aug. 22, 2022, 1:12 a.m. OK Java 17 TESTS 35 327 716800
169307754 hgaur01 C Aug. 22, 2022, 7:55 a.m. OK Java 17 TESTS 35 343 716800
169198053 kkz666 C Aug. 21, 2022, 4:52 a.m. OK Java 17 TESTS 35 343 819200
169197168 ggghg C Aug. 21, 2022, 4:36 a.m. OK Java 8 TESTS 35 155 0
169301826 anshulchou_123 C Aug. 22, 2022, 6:37 a.m. OK Java 8 TESTS 35 187 0
169323144 Lelouch_12 C Aug. 22, 2022, 10:47 a.m. OK Java 8 TESTS 35 202 0
169249960 vipulm7 C Aug. 21, 2022, 2:58 p.m. OK Java 8 TESTS 35 217 0
169257805 Swapniltri C Aug. 21, 2022, 4:23 p.m. OK Java 8 TESTS 35 218 0
169217294 sachinjaiswal C Aug. 21, 2022, 9:11 a.m. OK Java 8 TESTS 35 234 17817600
169220381 anurag1412 C Aug. 21, 2022, 9:43 a.m. OK Java 8 TESTS 35 529 0
169384303 hkurokawa C Aug. 23, 2022, 2:21 a.m. OK Java 8 TESTS 35 545 3276800
169212674 maharsh C Aug. 21, 2022, 8:16 a.m. OK Java 8 TESTS 35 779 0
169379381 tong96 C Aug. 22, 2022, 10:56 p.m. OK Java 8 TESTS 35 826 0
169203177 kidneywastaken C Aug. 21, 2022, 6:12 a.m. OK MS C++ 2017 TESTS 35 327 819200
169186078 Nulor C Aug. 21, 2022, 12:18 a.m. OK MS C++ 2017 TESTS 35 342 2457600
169247121 xuhe86950 C Aug. 21, 2022, 2:27 p.m. OK MS C++ 2017 TESTS 35 623 7987200
169207256 Fish_L C Aug. 21, 2022, 7:06 a.m. OK MS C++ 2017 TESTS 35 624 819200
169300125 tjdvyzl12345 C Aug. 22, 2022, 6:10 a.m. OK MS C++ 2017 TESTS 35 655 1638400
169195614 rttyuii C Aug. 21, 2022, 4:04 a.m. OK MS C++ 2017 TESTS 35 670 819200
169227561 DikshantAvi C Aug. 21, 2022, 10:59 a.m. OK MS C++ 2017 TESTS 35 685 819200
169224434 MrB0NAN C Aug. 21, 2022, 10:26 a.m. OK MS C++ 2017 TESTS 35 686 819200
169228423 784 C Aug. 21, 2022, 11:08 a.m. OK Perl TESTS 35 404 9830400
169228683 784 C Aug. 21, 2022, 11:11 a.m. OK Perl TESTS 35 405 9830400
169366952 maciaas C Aug. 22, 2022, 6:40 p.m. OK PyPy 3 TESTS 35 452 16486400
169231438 YMSeah C Aug. 21, 2022, 11:40 a.m. OK PyPy 3 TESTS 35 498 22220800
169210350 rajeshpenugonda6 C Aug. 21, 2022, 7:47 a.m. OK PyPy 3 TESTS 35 530 20172800
169222914 house_crows C Aug. 21, 2022, 10:10 a.m. OK PyPy 3 TESTS 35 560 21606400
169283434 hxu10 C Aug. 21, 2022, 11:24 p.m. OK PyPy 3 TESTS 35 561 15360000
169305096 LFcowering C Aug. 22, 2022, 7:22 a.m. OK PyPy 3 TESTS 35 717 11059200
169223575 house_crows C Aug. 21, 2022, 10:16 a.m. OK PyPy 3 TESTS 35 748 12185600
169305506 LFcowering C Aug. 22, 2022, 7:27 a.m. OK PyPy 3 TESTS 35 810 18124800
169202559 MohamedHamed123 C Aug. 21, 2022, 6:03 a.m. OK PyPy 3 TESTS 35 857 13926400
169299844 Gtintin C Aug. 22, 2022, 6:06 a.m. OK PyPy 3-64 TESTS 35 233 14540800
169300671 Gtintin C Aug. 22, 2022, 6:18 a.m. OK PyPy 3-64 TESTS 35 233 15155200
169300603 Gtintin C Aug. 22, 2022, 6:17 a.m. OK PyPy 3-64 TESTS 35 233 15257600
169228943 SophieHatter C Aug. 21, 2022, 11:13 a.m. OK PyPy 3-64 TESTS 35 248 30105600
169300431 Gtintin C Aug. 22, 2022, 6:14 a.m. OK PyPy 3-64 TESTS 35 249 15155200
169208730 PVR11 C Aug. 21, 2022, 7:26 a.m. OK PyPy 3-64 TESTS 35 264 18841600
169220191 aberent C Aug. 21, 2022, 9:41 a.m. OK PyPy 3-64 TESTS 35 280 15052800
169195880 blwright013 C Aug. 21, 2022, 4:10 a.m. OK PyPy 3-64 TESTS 35 280 21094400
169187876 pramana C Aug. 21, 2022, 1:14 a.m. OK PyPy 3-64 TESTS 35 296 14233600
169266382 itsRo C Aug. 21, 2022, 5:57 p.m. OK PyPy 3-64 TESTS 35 296 14336000
169199503 yujt123 C Aug. 21, 2022, 5:18 a.m. OK Python 3 TESTS 35 499 12083200
169194888 VioletVal C Aug. 21, 2022, 3:48 a.m. OK Python 3 TESTS 35 545 13926400
169225759 house_crows C Aug. 21, 2022, 10:40 a.m. OK Python 3 TESTS 35 561 7270400
169215425 Shantanu C Aug. 21, 2022, 8:50 a.m. OK Python 3 TESTS 35 561 9625600
169306134 gla_191500521 C Aug. 22, 2022, 7:35 a.m. OK Python 3 TESTS 35 623 8396800
169201682 ken1120 C Aug. 21, 2022, 5:51 a.m. OK Python 3 TESTS 35 639 8192000
169202583 MohamedHamed123 C Aug. 21, 2022, 6:03 a.m. OK Python 3 TESTS 35 639 9011200
169208904 biunovich C Aug. 21, 2022, 7:28 a.m. OK Python 3 TESTS 35 670 8192000
169210852 Hyrulia C Aug. 21, 2022, 7:54 a.m. OK Rust 2021 TESTS 35 31 7372800
169376593 Svlad_Cjelli C Aug. 22, 2022, 9:33 p.m. OK Rust 2021 TESTS 35 46 3993600
169319800 robostac C Aug. 22, 2022, 10:08 a.m. OK Rust 2021 TESTS 35 46 5017600
169324691 p-a-t C Aug. 22, 2022, 11:04 a.m. OK Rust 2021 TESTS 35 78 819200

remove filters

Back to search problems