Codeforces Round 882 (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
1847 Codeforces Round 882 (Div. 2) FINISHED False 8100 43169099 July 6, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3828 ) D Professor Higashikata PROGRAMMING brute force data structures ds greedy implementation sortings

B"Josuke is tired of his peaceful life in Morioh. Following in his nephew Jotaro's footsteps, he decides to study hard and become a professor of computer science. While looking up competitive programming problems online, he comes across the following one: Let s be a binary string of length n . An operation on s is defined as choosing two distinct integers i and j ( 1 <= q i < j <= q n ), and swapping the characters s_i, s_j . Consider the m strings t_1, t_2, ldots, t_m , where t_i is the substring ^ dagger of s from l_i to r_i . Define t(s) = t_1+t_2+ ldots+t_m as the concatenation of the strings t_i in that order. There are q updates to the string. In the i -th update s_{x_i} gets flipped. That is if s_{x_i}=1 , then s_{x_i} becomes 0 and vice versa. After each update, find the minimum number of operations one must perform on s to make t(s) lexicographically as large ^ ddagger as possible. Note that no operation is actually performed. We are only interested in the number of operations. Help Josuke in his dream by solving the problem for him. dagger A string a is a substring of a string b if a can be obtained from b by the deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. ddagger A string a is lexicographically larger than a string b of the same length if and only if the following holds: The first line contains three integers n , m , q ( 1 <= q n,m,q <= q 2 cdot 10^5 ). The next line contains a binary string s of length n , consisting only of digits 0 and 1 . The i -th line of the next m lines contains two integers l_i and r_i ( 1 <= q l_i <= q r_i <= q n ). The i -th line of the next q lines contains a"...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
212495210 Tdyx D July 7, 2023, 3:06 a.m. OK C# 10 TESTS 72 233 28774400
212493135 Tdyx D July 7, 2023, 2:41 a.m. OK C# 10 TESTS 72 249 30003200
212442801 DmitriyAnikeyev D July 6, 2023, 4:33 p.m. OK C# 10 TESTS 72 1013 65228800
212452632 rainboy D July 6, 2023, 5:52 p.m. OK GNU C11 TESTS 72 967 3379200
212448028 llzer D July 6, 2023, 4:48 p.m. OK GNU C++14 TESTS 72 187 2662400
212458033 tokitsukaze D July 6, 2023, 6:22 p.m. OK GNU C++14 TESTS 72 187 10649600
212472153 liar_frisky D July 6, 2023, 8:35 p.m. OK GNU C++14 TESTS 72 218 11366400
212505692 wanger22 D July 7, 2023, 5:24 a.m. OK GNU C++14 TESTS 72 233 9318400
212497055 y_kx_b D July 7, 2023, 3:27 a.m. OK GNU C++14 TESTS 72 233 9625600
212465483 qqqqqrz D July 6, 2023, 7:16 p.m. OK GNU C++14 TESTS 72 249 5529600
212473965 ROADTOBURNTHESUN D July 6, 2023, 8:58 p.m. OK GNU C++14 TESTS 72 264 24473600
212485979 MCPlayer542 D July 7, 2023, 12:54 a.m. OK GNU C++14 TESTS 72 265 11366400
212444250 Junz_LJL D July 6, 2023, 4:37 p.m. OK GNU C++14 TESTS 72 280 22118400
212473923 ROADTOBURNTHESUN D July 6, 2023, 8:58 p.m. OK GNU C++14 TESTS 72 280 24473600
212453967 aspirintimeskill D July 6, 2023, 5:57 p.m. OK GNU C++17 TESTS 72 202 5222400
212482603 Intellegent D July 6, 2023, 11:40 p.m. OK GNU C++17 TESTS 72 218 5734400
212486176 Muhammad-Zendy D July 7, 2023, 12:58 a.m. OK GNU C++17 TESTS 72 218 9523200
212445404 Muelsyse_ D July 6, 2023, 4:41 p.m. OK GNU C++17 TESTS 72 233 9011200
212496082 qqmy0220 D July 7, 2023, 3:15 a.m. OK GNU C++17 TESTS 72 233 9625600
212503517 le_banner D July 7, 2023, 4:54 a.m. OK GNU C++17 TESTS 72 233 9830400
212499094 wronganswerr D July 7, 2023, 3:53 a.m. OK GNU C++17 TESTS 72 233 11673600
212454232 Nulor D July 6, 2023, 5:58 p.m. OK GNU C++17 TESTS 72 233 13312000
212471722 T3T____ D July 6, 2023, 8:29 p.m. OK GNU C++17 TESTS 72 233 19660800
212503957 qzhfx D July 7, 2023, 5 a.m. OK GNU C++17 TESTS 72 248 6144000
212453607 rainboy D July 6, 2023, 5:55 p.m. OK GNU C++17 (64) TESTS 72 155 3276800
212446606 _chroneZ D July 6, 2023, 4:44 p.m. OK GNU C++17 (64) TESTS 72 171 3174400
212503580 qzhfx D July 7, 2023, 4:55 a.m. OK GNU C++17 (64) TESTS 72 171 15667200
212495859 Sy_03 D July 7, 2023, 3:13 a.m. OK GNU C++17 (64) TESTS 72 187 15667200
212494079 1205691775 D July 7, 2023, 2:54 a.m. OK GNU C++17 (64) TESTS 72 202 4505600
212504705 wsyear D July 7, 2023, 5:11 a.m. OK GNU C++17 (64) TESTS 72 218 19353600
212489904 liby D July 7, 2023, 2 a.m. OK GNU C++17 (64) TESTS 72 233 14438400
212502654 Ahmed_Salama D July 7, 2023, 4:41 a.m. OK GNU C++17 (64) TESTS 72 264 12083200
212497505 tomato_potato D July 7, 2023, 3:33 a.m. OK GNU C++17 (64) TESTS 72 264 13107200
212476237 enslaved D July 6, 2023, 9:34 p.m. OK GNU C++17 (64) TESTS 72 264 15769600
212443290 ishmeal D July 6, 2023, 4:35 p.m. OK GNU C++20 (64) TESTS 72 124 2969600
212489466 honakakaka D July 7, 2023, 1:53 a.m. OK GNU C++20 (64) TESTS 72 124 3993600
212460201 hopesanddreams D July 6, 2023, 6:40 p.m. OK GNU C++20 (64) TESTS 72 124 6451200
212501931 qzhfx D July 7, 2023, 4:31 a.m. OK GNU C++20 (64) TESTS 72 124 6963200
212498783 yuexiAOvO D July 7, 2023, 3:48 a.m. OK GNU C++20 (64) TESTS 72 124 6963200
212483936 AyuAnchor D July 7, 2023, 12:08 a.m. OK GNU C++20 (64) TESTS 72 124 7987200
212483470 AyuAnchor D July 6, 2023, 11:59 p.m. OK GNU C++20 (64) TESTS 72 124 7987200
212459085 A_G D July 6, 2023, 6:30 p.m. OK GNU C++20 (64) TESTS 72 139 8089600
212505258 yghygh123 D July 7, 2023, 5:17 a.m. OK GNU C++20 (64) TESTS 72 140 6963200
212444406 russian_proger D July 6, 2023, 4:38 p.m. OK GNU C++20 (64) TESTS 72 140 7168000
212507442 ggghg D July 7, 2023, 5:45 a.m. OK Java 11 TESTS 72 514 4710400
212453923 shojin_pro D July 6, 2023, 5:57 p.m. OK Java 11 TESTS 72 576 4710400
212447807 WORTH D July 6, 2023, 4:47 p.m. OK Java 11 TESTS 72 763 10035200
212500552 dzhi D July 7, 2023, 4:12 a.m. OK Java 11 TESTS 72 1356 26112000
212500015 dzhi D July 7, 2023, 4:05 a.m. OK Java 11 TESTS 72 1887 26112000
212489911 wizardleen D July 7, 2023, 2 a.m. OK Java 17 TESTS 72 982 26009600
212444441 thedesalizes D July 6, 2023, 4:38 p.m. OK Java 8 TESTS 72 358 0
212461686 The_terminator D July 6, 2023, 6:54 p.m. OK Java 8 TESTS 72 1060 25190400
212455411 UniversalAdmin D July 6, 2023, 6:05 p.m. OK Java 8 TESTS 72 1403 112844800
212494828 RobinFromTheHood D July 7, 2023, 3:02 a.m. OK PyPy 3-64 TESTS 72 452 24371200
212482977 AyuAnchor D July 6, 2023, 11:48 p.m. OK PyPy 3-64 TESTS 72 499 23347200
212507633 qishui7 D July 7, 2023, 5:47 a.m. OK PyPy 3-64 TESTS 72 546 39321600
212483102 AyuAnchor D July 6, 2023, 11:51 p.m. OK PyPy 3-64 TESTS 72 561 23142400
212457285 titia D July 6, 2023, 6:17 p.m. OK PyPy 3-64 TESTS 72 638 60211200
212505723 VitaLemonTea D July 7, 2023, 5:24 a.m. OK PyPy 3-64 TESTS 72 639 37273600
212442404 kavorka D July 6, 2023, 4:32 p.m. OK PyPy 3-64 TESTS 72 732 46796800
212481357 AyuAnchor D July 6, 2023, 11:12 p.m. OK PyPy 3-64 TESTS 72 920 20275200
212481399 AyuAnchor D July 6, 2023, 11:13 p.m. OK PyPy 3-64 TESTS 72 966 20582400
212487339 zronghui D July 7, 2023, 1:19 a.m. OK PyPy 3-64 TESTS 72 966 61337600
212444355 avnyu D July 6, 2023, 4:38 p.m. OK Rust 2021 TESTS 72 187 28569600

remove filters

Back to search problems