Codeforces Round 765 (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
1625 Codeforces Round 765 (Div. 2) FINISHED False 7200 95277263 Jan. 12, 2022, 12:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16201 ) B Elementary Particles PROGRAMMING greedy

B'Martians are actively engaged in interplanetary trade. Olymp City, the Martian city known for its spaceport, has become a place where goods from all the corners of our Galaxy come. To deliver even more freight from faraway planets, Martians need fast spaceships. A group of scientists conducts experiments to build a fast engine for the new spaceship. In the current experiment, there are n elementary particles, the i -th of them has type a_i . Denote a subsegment of the particle sequence ( a_1, a_2, ... , a_n ) as a sequence ( a_l, a_{l+1}, ... , a_r ) for some left bound l and right bound r ( 1 <= l <= r <= n ). For instance, the sequence (1 4 2 8 5 7) for l=2 and r=4 has the sequence (4 2 8) as a subsegment. Two subsegments are considered different if at least one bound of those subsegments differs. Note that the subsegments can be equal as sequences but still considered different. For example, consider the sequence (1 1 1 1 1) and two of its subsegments: one with l=1 and r=3 and another with l=2 and r=4 . Both subsegments are equal to (1 1 1) , but still considered different, as their left and right bounds differ. The scientists want to conduct a reaction to get two different subsegments of the same length. Denote this length k . The resulting pair of subsegments must be harmonious, i. e. for some i ( 1 <= i <= k ) it must be true that the types of particles on the i -th position are the same for these two subsegments. For example, the pair (1 7 3) and (4 7 8) is harmonious, as both subsegments have 7 on the second position. The pair (1 2 3) and (3 1 2) is not harmonious. The longer are harmonious subsegments, the more chances for the scientists to design a fast engine. So, they asked you to calculate the maximal possible length of harmonious pair made of different subsegments. The'...

Tutorials

Editorial of Codeforces Round #765 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
142553051 longzhaocheng B Jan. 12, 2022, 11:27 p.m. OK Clang++17 Diagnostics TESTS 20 249 16691200
142527655 lihomwhen B Jan. 12, 2022, 3:28 p.m. OK GNU C11 TESTS 17 46 1228800
142514944 pratik_kulkarni B Jan. 12, 2022, 1:58 p.m. OK GNU C11 TESTS 17 46 1843200
142553446 dean.menezes B Jan. 12, 2022, 11:47 p.m. OK GNU C11 TESTS 20 62 614400
142523856 rainboy B Jan. 12, 2022, 2:51 p.m. OK GNU C11 TESTS 17 62 1228800
142537955 vyom_goyal B Jan. 12, 2022, 5:32 p.m. OK GNU C11 TESTS 19 77 1228800
142516086 HHU_fl B Jan. 12, 2022, 2 p.m. OK GNU C11 TESTS 17 78 1228800
142552680 antguz B Jan. 12, 2022, 11:09 p.m. OK GNU C++14 TESTS 20 78 614400
142514616 whxtc B Jan. 12, 2022, 1:57 p.m. OK GNU C++14 TESTS 17 78 614400
142516685 SuJiTh_CoDeR B Jan. 12, 2022, 2:02 p.m. OK GNU C++14 TESTS 17 78 1228800
142513649 ParsaAp B Jan. 12, 2022, 1:55 p.m. OK GNU C++14 TESTS 17 78 1228800
142531313 karen0603 B Jan. 12, 2022, 4:10 p.m. OK GNU C++14 TESTS 17 78 1228800
142525472 wuhudaduizhang B Jan. 12, 2022, 3:06 p.m. OK GNU C++14 TESTS 17 78 1228800
142536525 peuch B Jan. 12, 2022, 5:15 p.m. OK GNU C++14 TESTS 17 78 1228800
142553138 2021lumengde B Jan. 12, 2022, 11:32 p.m. OK GNU C++14 TESTS 20 78 1740800
142517031 wushangxiaoya B Jan. 12, 2022, 2:02 p.m. OK GNU C++14 TESTS 17 78 1740800
142524515 Linn2000 B Jan. 12, 2022, 2:57 p.m. OK GNU C++14 TESTS 17 78 1843200
142524002 Chao_zi B Jan. 12, 2022, 2:52 p.m. OK GNU C++17 TESTS 17 46 5017600
142529521 Ammar2001s B Jan. 12, 2022, 3:49 p.m. OK GNU C++17 TESTS 17 78 614400
142527646 toastifishi B Jan. 12, 2022, 3:28 p.m. OK GNU C++17 TESTS 17 78 614400
142525788 wushu B Jan. 12, 2022, 3:09 p.m. OK GNU C++17 TESTS 17 78 614400
142524633 wushu B Jan. 12, 2022, 2:58 p.m. OK GNU C++17 TESTS 17 78 614400
142529631 Ammar2001 B Jan. 12, 2022, 3:50 p.m. OK GNU C++17 TESTS 17 78 614400
142540520 DELTA_73 B Jan. 12, 2022, 6:04 p.m. OK GNU C++17 TESTS 20 78 614400
142554179 AKUSACO B Jan. 13, 2022, 12:29 a.m. OK GNU C++17 TESTS 20 78 614400
142524087 WA_automata B Jan. 12, 2022, 2:53 p.m. OK GNU C++17 TESTS 17 78 819200
142523036 XDU_wyh B Jan. 12, 2022, 2:44 p.m. OK GNU C++17 TESTS 17 78 819200
142524742 TS_Christina B Jan. 12, 2022, 2:59 p.m. OK GNU C++17 (64) TESTS 17 46 614400
142558361 gqf123 B Jan. 13, 2022, 3:05 a.m. OK GNU C++17 (64) TESTS 20 46 1228800
142520942 observer1995 B Jan. 12, 2022, 2:30 p.m. OK GNU C++17 (64) TESTS 17 61 614400
142540983 abz-codes B Jan. 12, 2022, 6:10 p.m. OK GNU C++17 (64) TESTS 20 61 1228800
142511014 FakeRainbow_sjy B Jan. 12, 2022, 1:48 p.m. OK GNU C++17 (64) TESTS 17 61 3993600
142531346 Golden B Jan. 12, 2022, 4:10 p.m. OK GNU C++17 (64) TESTS 17 62 1638400
142526036 SevenDucks B Jan. 12, 2022, 3:11 p.m. OK GNU C++17 (64) TESTS 17 62 1638400
142526186 SevenDawns B Jan. 12, 2022, 3:12 p.m. OK GNU C++17 (64) TESTS 17 62 1638400
142517995 jybbbbb B Jan. 12, 2022, 2:04 p.m. OK GNU C++17 (64) TESTS 17 62 1843200
142534051 Graphter B Jan. 12, 2022, 4:45 p.m. OK GNU C++17 (64) TESTS 17 62 2867200
142529243 wasted-light B Jan. 12, 2022, 3:45 p.m. OK GNU C++20 (64) TESTS 17 46 1228800
142525459 D.t.R B Jan. 12, 2022, 3:05 p.m. OK GNU C++20 (64) TESTS 17 46 2457600
142524118 ShivanshJ B Jan. 12, 2022, 2:53 p.m. OK GNU C++20 (64) TESTS 17 46 2764800
142532055 sweet_hope25 B Jan. 12, 2022, 4:20 p.m. OK GNU C++20 (64) TESTS 17 61 819200
142534272 xilyfeaaaa B Jan. 12, 2022, 4:48 p.m. OK GNU C++20 (64) TESTS 17 61 1228800
142534119 ld10 B Jan. 12, 2022, 4:46 p.m. OK GNU C++20 (64) TESTS 17 62 1228800
142522522 jiangly B Jan. 12, 2022, 2:40 p.m. OK GNU C++20 (64) TESTS 17 62 1228800
142536008 Maango16 B Jan. 12, 2022, 5:09 p.m. OK GNU C++20 (64) TESTS 17 62 1228800
142520414 syrgabaev B Jan. 12, 2022, 2:27 p.m. OK GNU C++20 (64) TESTS 17 62 1638400
142534452 abhilash_360 B Jan. 12, 2022, 4:50 p.m. OK GNU C++20 (64) TESTS 17 62 1843200
142517072 D05T0N B Jan. 12, 2022, 2:02 p.m. OK Go TESTS 17 140 49356800
142517162 1e9y B Jan. 12, 2022, 2:03 p.m. OK Go TESTS 17 1747 17408000
142539012 SanskarxRawat B Jan. 12, 2022, 5:44 p.m. OK Java 11 TESTS 20 218 307200
142528360 pras7946 B Jan. 12, 2022, 3:36 p.m. OK Java 11 TESTS 17 233 0
142551352 Toinfinity B Jan. 12, 2022, 10:04 p.m. OK Java 11 TESTS 20 233 0
142540925 Sonam_Chhewang B Jan. 12, 2022, 6:09 p.m. OK Java 11 TESTS 20 233 0
142552010 LongWalk B Jan. 12, 2022, 10:34 p.m. OK Java 11 TESTS 20 327 0
142543055 SaberXpro B Jan. 12, 2022, 6:38 p.m. OK Java 11 TESTS 20 342 14745600
142530094 __Serendipity B Jan. 12, 2022, 3:56 p.m. OK Java 11 TESTS 17 343 11673600
142562713 unfixedbug B Jan. 13, 2022, 4:32 a.m. OK Java 11 TESTS 20 343 14745600
142543069 C4T4LYST B Jan. 12, 2022, 6:38 p.m. OK Java 11 TESTS 20 358 11468800
142530048 __Serendipity B Jan. 12, 2022, 3:55 p.m. OK Java 11 TESTS 17 358 11673600
142529043 tarun_sm B Jan. 12, 2022, 3:43 p.m. OK Java 8 TESTS 17 248 16793600
142526082 vermadv2000 B Jan. 12, 2022, 3:11 p.m. OK Java 8 TESTS 17 249 5427200
142556887 duyipeng B Jan. 13, 2022, 2:23 a.m. OK Java 8 TESTS 20 280 7577600
142525377 Jason_Is_Here B Jan. 12, 2022, 3:05 p.m. OK Java 8 TESTS 17 280 7884800
142535600 tanishq044 B Jan. 12, 2022, 5:04 p.m. OK Java 8 TESTS 17 296 7577600
142523099 Jason_Is_Here B Jan. 12, 2022, 2:45 p.m. OK Java 8 TESTS 17 327 7884800
142561647 SangramH123 B Jan. 13, 2022, 4:14 a.m. OK Java 8 TESTS 20 327 10240000
142522975 RonWonWon B Jan. 12, 2022, 2:44 p.m. OK Java 8 TESTS 17 436 25497600
142568705 gauravbajaj B Jan. 13, 2022, 5:57 a.m. OK Java 8 TESTS 20 467 36454400
142528635 ITSpecialist B Jan. 12, 2022, 3:39 p.m. OK Java 8 TESTS 17 483 0
142511507 mircea85 B Jan. 12, 2022, 1:49 p.m. OK Mono C# TESTS 17 155 29184000
142514877 sgly33 B Jan. 12, 2022, 1:58 p.m. OK MS C++ 2017 TESTS 17 109 3993600
142521513 Tagaki B Jan. 12, 2022, 2:33 p.m. OK MS C++ 2017 TESTS 17 234 1228800
142529164 misaka12435 B Jan. 12, 2022, 3:44 p.m. OK MS C++ 2017 TESTS 17 249 614400
142542984 itmosha B Jan. 12, 2022, 6:37 p.m. OK MS C++ 2017 TESTS 20 264 7884800
142555808 shuitishashou B Jan. 13, 2022, 1:44 a.m. OK MS C++ 2017 TESTS 20 343 5529600
142561659 WangChaoqwe B Jan. 13, 2022, 4:14 a.m. OK MS C++ 2017 TESTS 20 374 5529600
142534940 Ayman_Attili26 B Jan. 12, 2022, 4:56 p.m. OK MS C++ 2017 TESTS 17 405 4915200
142510472 gggggg50010 B Jan. 12, 2022, 1:46 p.m. OK MS C++ 2017 TESTS 17 405 5017600
142561621 WangChaoqwe B Jan. 13, 2022, 4:13 a.m. OK MS C++ 2017 TESTS 20 405 5529600
142535707 Tangerine B Jan. 12, 2022, 5:05 p.m. OK MS C++ 2017 TESTS 17 405 11571200
142513431 Kukel_RoadToGrandmaster B Jan. 12, 2022, 1:54 p.m. OK .NET Core C# TESTS 17 124 27443200
142529074 suraj B Jan. 12, 2022, 3:43 p.m. OK .NET Core C# TESTS 17 171 40038400
142544785 rsFalse B Jan. 12, 2022, 7:08 p.m. OK Perl TESTS 20 389 38707200
142537911 KanishkGoel B Jan. 12, 2022, 5:31 p.m. OK PyPy 3 TESTS 19 171 21504000
142553673 xyxoro B Jan. 13, 2022, 12:02 a.m. OK PyPy 3 TESTS 20 187 20377600
142553609 xyxoro B Jan. 12, 2022, 11:58 p.m. OK PyPy 3 TESTS 20 187 20582400
142538110 NAVI_Perfecto B Jan. 12, 2022, 5:34 p.m. OK PyPy 3 TESTS 19 265 32153600
142537785 derghost B Jan. 12, 2022, 5:30 p.m. OK PyPy 3 TESTS 19 296 24883200
142543292 priyankaskumar B Jan. 12, 2022, 6:43 p.m. OK PyPy 3 TESTS 20 296 25292800
142520340 Aestroix B Jan. 12, 2022, 2:27 p.m. OK PyPy 3 TESTS 17 296 33689600
142550802 chicosena B Jan. 12, 2022, 9:42 p.m. OK PyPy 3 TESTS 20 311 18227200
142543822 ON_THE_EDGE B Jan. 12, 2022, 6:52 p.m. OK PyPy 3 TESTS 20 311 24576000
142540018 bongcloud7777 B Jan. 12, 2022, 5:57 p.m. OK PyPy 3 TESTS 20 311 35840000
142526873 lemiao12 B Jan. 12, 2022, 3:19 p.m. OK PyPy 3-64 TESTS 17 217 35532800
142530419 notTehlka B Jan. 12, 2022, 3:59 p.m. OK PyPy 3-64 TESTS 17 218 41062400
142557267 plevande B Jan. 13, 2022, 2:35 a.m. OK PyPy 3-64 TESTS 20 233 34099200
142564963 rivnam B Jan. 13, 2022, 5:11 a.m. OK PyPy 3-64 TESTS 20 296 57958400
142533837 Dingovinaa B Jan. 12, 2022, 4:42 p.m. OK PyPy 3-64 TESTS 17 311 39219200
142552512 monsterrazzy B Jan. 12, 2022, 11 p.m. OK PyPy 3-64 TESTS 20 312 37785600
142527353 Night_Spark--75 B Jan. 12, 2022, 3:24 p.m. OK PyPy 3-64 TESTS 17 326 29286400
142537098 aberent B Jan. 12, 2022, 5:22 p.m. OK PyPy 3-64 TESTS 17 327 22528000
142540736 Kornelius B Jan. 12, 2022, 6:06 p.m. OK PyPy 3-64 TESTS 20 327 27955200
142564060 _Shubham B Jan. 13, 2022, 4:57 a.m. OK PyPy 3-64 TESTS 20 327 37376000
142523701 saikotha2407 B Jan. 12, 2022, 2:50 p.m. OK Python 2 TESTS 17 390 16998400
142515066 LLLLLNNNNN B Jan. 12, 2022, 1:58 p.m. OK Python 3 TESTS 17 326 19353600
142536514 LGDDK B Jan. 12, 2022, 5:15 p.m. OK Python 3 TESTS 17 327 13824000
142524026 eugalt B Jan. 12, 2022, 2:52 p.m. OK Python 3 TESTS 17 342 21196800
142523477 eugalt B Jan. 12, 2022, 2:48 p.m. OK Python 3 TESTS 17 343 21196800
142523637 vishnukhanna01 B Jan. 12, 2022, 2:49 p.m. OK Python 3 TESTS 17 358 21196800
142520616 eugalt B Jan. 12, 2022, 2:28 p.m. OK Python 3 TESTS 17 358 21196800
142527656 shardul_rajhans B Jan. 12, 2022, 3:28 p.m. OK Python 3 TESTS 17 373 17817600
142531925 eugalt B Jan. 12, 2022, 4:18 p.m. OK Python 3 TESTS 17 374 15872000
142532338 eugalt B Jan. 12, 2022, 4:23 p.m. OK Python 3 TESTS 17 389 15872000
142514569 klindyuk B Jan. 12, 2022, 1:57 p.m. OK Python 3 TESTS 17 545 24985600
142523149 Spheniscine B Jan. 12, 2022, 2:45 p.m. OK Rust 2021 TESTS 17 46 5529600

remove filters

Back to search problems