Codeforces Round 881 (Div. 3)

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
1843 Codeforces Round 881 (Div. 3) FINISHED False 8100 54228288 June 20, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1728 ) F2 Omsk Metro (hard version) PROGRAMMING data structures dfs and similar divide and conquer dp implementation math trees

B'This is the hard version of the problem. The only difference between the simple and hard versions is that in this version u can take any possible value. As is known, Omsk is the capital of Berland. Like any capital, Omsk has a well-developed metro system. The Omsk metro consists of a certain number of stations connected by tunnels, and between any two stations there is exactly one path that passes through each of the tunnels no more than once. In other words, the metro is a tree. To develop the metro and attract residents, the following system is used in Omsk. Each station has its own weight x in {-1, 1 } . If the station has a weight of -1 , then when the station is visited by an Omsk resident, a fee of 1 burle is charged. If the weight of the station is 1 , then the Omsk resident is rewarded with 1 burle. Omsk Metro currently has only one station with number 1 and weight x = 1 . Every day, one of the following events occurs: You are a friend of Alex, so your task is to answer Alex 's questions. dagger Subsegment -- continuous sequence of elements. The first line contains a single number t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The first line of each test case contains the number n ( 1 <= q n <= q 2 cdot 10^5 ) -- the number of events. Then there are n lines describing the events. In the i -th line, one of the following options is possible: It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each of Alex 's questions, output "Yes" (without quotes) if the subsegment described in the condition exists, otherwise output "No" (without quotes). You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer). Explanation of the first sample. The answer to the second question is "Yes", because there is a path 1 . In the fourth question, we ca'...

Tutorials

Codeforces Round #881 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
210611417 PCC F2 June 22, 2023, 3:17 a.m. OK GNU C++14 TESTS 32 280 42086400
210544623 bridgekiller F2 June 21, 2023, 12:24 p.m. OK GNU C++14 TESTS 32 280 123494400
210530465 PoonYaPat F2 June 21, 2023, 9:59 a.m. OK GNU C++14 TESTS 32 280 129024000
210616366 FiraCode F2 June 22, 2023, 4:42 a.m. OK GNU C++14 TESTS 32 295 123494400
210493516 zltzlt F2 June 21, 2023, 12:55 a.m. OK GNU C++14 TESTS 32 311 67584000
210543617 Apiram F2 June 21, 2023, 12:15 p.m. OK GNU C++14 TESTS 32 311 80793600
210501922 TrendBattles F2 June 21, 2023, 3:57 a.m. OK GNU C++14 TESTS 32 311 100147200
210516548 Adp_D F2 June 21, 2023, 7:46 a.m. OK GNU C++14 TESTS 32 312 54476800
210553384 lostintianyi F2 June 21, 2023, 1:47 p.m. OK GNU C++14 TESTS 32 327 356761600
210543849 Biot_DucToan F2 June 21, 2023, 12:17 p.m. OK GNU C++14 TESTS 32 358 166092800
210620617 Mr..Bot F2 June 22, 2023, 5:51 a.m. OK GNU C++17 TESTS 32 218 86528000
210517399 Bedge F2 June 21, 2023, 7:55 a.m. OK GNU C++17 TESTS 32 218 91443200
210502044 yyytf__ F2 June 21, 2023, 4 a.m. OK GNU C++17 TESTS 32 233 85299200
210565612 knightzzz1 F2 June 21, 2023, 3:42 p.m. OK GNU C++17 TESTS 32 233 85401600
210522471 a757403 F2 June 21, 2023, 8:43 a.m. OK GNU C++17 TESTS 32 233 141312000
210587897 OMG_wc F2 June 21, 2023, 8:03 p.m. OK GNU C++17 TESTS 32 249 129024000
210495734 wangjunchao F2 June 21, 2023, 1:54 a.m. OK GNU C++17 TESTS 32 265 129024000
210579791 Nurss F2 June 21, 2023, 6:12 p.m. OK GNU C++17 TESTS 32 280 103014400
210607442 Gr47 F2 June 22, 2023, 2 a.m. OK GNU C++17 TESTS 32 280 109670400
210501904 yyytf__ F2 June 21, 2023, 3:57 a.m. OK GNU C++17 TESTS 32 295 85504000
210543016 bigJ F2 June 21, 2023, 12:09 p.m. OK GNU C++17 (64) TESTS 32 202 85708800
210521010 pigstar_fan F2 June 21, 2023, 8:30 a.m. OK GNU C++17 (64) TESTS 32 202 117248000
210521074 euoao F2 June 21, 2023, 8:31 a.m. OK GNU C++17 (64) TESTS 32 217 117248000
210504308 korokseeds F2 June 21, 2023, 4:40 a.m. OK GNU C++17 (64) TESTS 32 218 94105600
210521129 euoao F2 June 21, 2023, 8:32 a.m. OK GNU C++17 (64) TESTS 32 218 117248000
210512847 korokseeds F2 June 21, 2023, 7:06 a.m. OK GNU C++17 (64) TESTS 32 233 94105600
210585166 Absurd_ F2 June 21, 2023, 7:25 p.m. OK GNU C++17 (64) TESTS 32 233 125235200
210546098 gqf123 F2 June 21, 2023, 12:39 p.m. OK GNU C++17 (64) TESTS 32 233 134656000
210544552 gqf123 F2 June 21, 2023, 12:23 p.m. OK GNU C++17 (64) TESTS 32 249 134656000
210513283 timmyfeng F2 June 21, 2023, 7:10 a.m. OK GNU C++17 (64) TESTS 32 249 134860800
210495373 MattTheNub F2 June 21, 2023, 1:45 a.m. OK GNU C++20 (64) TESTS 32 155 31334400
210497812 Thallium54 F2 June 21, 2023, 2:39 a.m. OK GNU C++20 (64) TESTS 32 155 43315200
210498062 rgnerdplayer F2 June 21, 2023, 2:44 a.m. OK GNU C++20 (64) TESTS 32 171 90521600
210497491 Thallium54 F2 June 21, 2023, 2:32 a.m. OK GNU C++20 (64) TESTS 32 186 43315200
210567059 oval_m F2 June 21, 2023, 3:56 p.m. OK GNU C++20 (64) TESTS 32 186 84480000
210583433 Nea1 F2 June 21, 2023, 7 p.m. OK GNU C++20 (64) TESTS 32 187 46182400
210582593 Nea1 F2 June 21, 2023, 6:48 p.m. OK GNU C++20 (64) TESTS 32 202 41881600
210521390 huz.n F2 June 21, 2023, 8:34 a.m. OK GNU C++20 (64) TESTS 32 202 42291200
210568328 oval_m F2 June 21, 2023, 4:08 p.m. OK GNU C++20 (64) TESTS 32 202 84480000
210602521 arodnap33 F2 June 22, 2023, 12:16 a.m. OK GNU C++20 (64) TESTS 32 202 99840000
210493421 dzhi F2 June 21, 2023, 12:53 a.m. OK Java 11 TESTS 32 982 149196800
210493094 dzhi F2 June 21, 2023, 12:43 a.m. OK Java 11 TESTS 32 1060 149196800
210573526 Abhijit1986 F2 June 21, 2023, 5 p.m. OK Java 11 TESTS 32 1107 63283200
210529724 ch2001 F2 June 21, 2023, 9:52 a.m. OK Java 11 TESTS 32 1107 63283200
210529165 ch2001 F2 June 21, 2023, 9:47 a.m. OK Java 11 TESTS 32 1107 63283200
210522130 YummyPie F2 June 21, 2023, 8:41 a.m. OK Rust 2021 TESTS 32 280 109772800
210539356 Stan_Marsh Kenny__McCormick Thief_Executive_Officer F2 June 21, 2023, 11:33 a.m. OK Rust 2021 TESTS 32 592 141414400
210533383 robostac F2 June 21, 2023, 10:30 a.m. OK Rust 2021 TESTS 32 639 141414400

remove filters

Back to search problems