Codeforces Round 921 (Div. 1)

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
1924 Codeforces Round 921 (Div. 1) FINISHED False 7200 25456499 Jan. 27, 2024, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2604 ) B Space Harbour PROGRAMMING brute force data structures implementation math sortings

B'There are n points numbered 1 to n on a straight line. Initially, there are m harbours. The i -th harbour is at point X_i and has a value V_i . It is guaranteed that there are harbours at the points 1 and n . There is exactly one ship on each of the n points. The cost of moving a ship from its current location to the next harbour is the product of the value of the nearest harbour to its left and the distance from the nearest harbour to its right. Specifically, if a ship is already at a harbour, the cost of moving it to the next harbour is 0 . Additionally, there are q queries, each of which is either of the following 2 types: The first line contains three integers n , m , and q ( 2 <= m <= n <= 3 cdot 10^5 , 1 <= q <= 3 cdot 10^5 ) -- the number of points, harbours, and queries, respectively. The second line contains m distinct integers X_1, X_2, ldots, X_m(1 <= X_i <= n) -- the position at which the i -th harbour is located. The third line contains m integers V_1, V_2, ldots, V_m(1 <= V_i <= 10^7) -- the value of the i -th harbour. Each of the next q lines contains three integers. The first integer is t ( 1 <= t <= 2 ) -- type of query. If t=1 , then the next two integers are x and v ( 2 <= x <= n - 1 , 1 <= v <= 10^7 ) -- first-type query. If t=2 , then the next two integers are l and r ( 1 <= l <= r <= n ) -- second-type query. It is guaranteed that there is at least one second-type query. For every second-type query, print one integer in a new line -- answer to this query. For the first type 2 query, the cost for ships at positions 2 , 3 , 4 and 5 are 3(3 x 1) , 0 , 96(24 x 4) and 72(24 x 3) respectively. For the second type 2 query, since the ship at position $'...

Tutorials

Codeforces Round 921 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
243642900 chro4896 B Jan. 27, 2024, 4:21 p.m. OK GNU C11 TESTS 99 1981 47001600
243622551 al3xstr33t B Jan. 27, 2024, 3:50 p.m. OK GNU C++17 TESTS 99 358 22016000
243601360 applese B Jan. 27, 2024, 3:24 p.m. OK GNU C++17 TESTS 99 452 15872000
243693154 sslzyc B Jan. 28, 2024, 1:04 a.m. OK GNU C++17 TESTS 99 467 14643200
243609607 suomynonA B Jan. 27, 2024, 3:33 p.m. OK GNU C++17 TESTS 99 483 14643200
243637241 dorulean B Jan. 27, 2024, 4:12 p.m. OK GNU C++17 TESTS 99 483 14643200
243634999 espr1t B Jan. 27, 2024, 4:08 p.m. OK GNU C++17 TESTS 99 498 14643200
243656501 sha7dow B Jan. 27, 2024, 4:44 p.m. OK GNU C++17 TESTS 99 498 24576000
243611620 clfzs B Jan. 27, 2024, 3:35 p.m. OK GNU C++17 TESTS 99 499 31232000
243703621 Max.D. B Jan. 28, 2024, 3:58 a.m. OK GNU C++17 TESTS 99 514 7168000
243614355 Skeef79 B Jan. 27, 2024, 3:39 p.m. OK GNU C++17 TESTS 99 514 14643200
243689252 Spad2e B Jan. 27, 2024, 11:18 p.m. OK GNU C++17 (64) TESTS 99 358 6451200
243695136 t98slider B Jan. 28, 2024, 1:48 a.m. OK GNU C++17 (64) TESTS 99 358 9523200
243696202 orzdevinwang B Jan. 28, 2024, 2:07 a.m. OK GNU C++17 (64) TESTS 99 420 34508800
243574522 Benq B Jan. 27, 2024, 3 p.m. OK GNU C++17 (64) TESTS 99 436 16896000
243593279 YamadaRyo B Jan. 27, 2024, 3:16 p.m. OK GNU C++17 (64) TESTS 99 452 26521600
243696502 chappy1 B Jan. 28, 2024, 2:12 a.m. OK GNU C++17 (64) TESTS 99 467 16896000
243650641 berr B Jan. 27, 2024, 4:35 p.m. OK GNU C++17 (64) TESTS 99 468 21708800
243638262 fast_photon B Jan. 27, 2024, 4:13 p.m. OK GNU C++17 (64) TESTS 99 483 28876800
243622941 riano_ B Jan. 27, 2024, 3:50 p.m. OK GNU C++17 (64) TESTS 99 498 25292800
243581060 Rebelz B Jan. 27, 2024, 3:05 p.m. OK GNU C++17 (64) TESTS 99 499 19251200
243690330 magnus.hegdahl B Jan. 27, 2024, 11:45 p.m. OK GNU C++20 (64) TESTS 99 62 4505600
243690166 magnus.hegdahl B Jan. 27, 2024, 11:41 p.m. OK GNU C++20 (64) TESTS 99 77 7782400
243591802 maspy B Jan. 27, 2024, 3:14 p.m. OK GNU C++20 (64) TESTS 99 109 11571200
243681737 magnus.hegdahl B Jan. 27, 2024, 9:04 p.m. OK GNU C++20 (64) TESTS 99 218 19763200
243618561 happydef B Jan. 27, 2024, 3:44 p.m. OK GNU C++20 (64) TESTS 99 234 109260800
243643222 XDEv11 B Jan. 27, 2024, 4:22 p.m. OK GNU C++20 (64) TESTS 99 249 21811200
243592978 Sulfox B Jan. 27, 2024, 3:15 p.m. OK GNU C++20 (64) TESTS 99 312 21196800
243665440 magnus.hegdahl B Jan. 27, 2024, 6:47 p.m. OK GNU C++20 (64) TESTS 99 342 19763200
243667521 Linqi05 B Jan. 27, 2024, 6:57 p.m. OK GNU C++20 (64) TESTS 99 358 16896000
243634653 otoshigo B Jan. 27, 2024, 4:07 p.m. OK GNU C++20 (64) TESTS 99 358 23040000
243612375 taran_1407 B Jan. 27, 2024, 3:36 p.m. OK Java 21 TESTS 99 1092 39731200
243641547 golions B Jan. 27, 2024, 4:19 p.m. OK Java 8 TESTS 99 1045 15872000
243700681 thedesalizes B Jan. 28, 2024, 3:18 a.m. OK Java 8 TESTS 99 1076 33382400
243699989 thedesalizes B Jan. 28, 2024, 3:08 a.m. OK Java 8 TESTS 99 1138 33280000
243604126 SecondThread B Jan. 27, 2024, 3:27 p.m. OK Java 8 TESTS 99 1216 77209600
243638310 MagentaCobra B Jan. 27, 2024, 4:13 p.m. OK Java 8 TESTS 99 1684 96051200
243592435 FastFreeTask B Jan. 27, 2024, 3:15 p.m. OK Kotlin 1.9 TESTS 99 794 15257600
243599207 Tlatoani B Jan. 27, 2024, 3:21 p.m. OK Kotlin 1.9 TESTS 99 1933 42086400
243665042 misorin B Jan. 27, 2024, 6:44 p.m. OK PyPy 3-64 TESTS 99 857 73728000
243647808 hxu10 B Jan. 27, 2024, 4:30 p.m. OK PyPy 3-64 TESTS 99 1029 37990400
243648205 yupooh B Jan. 27, 2024, 4:31 p.m. OK PyPy 3-64 TESTS 99 1310 49868800
243621015 Z_actuary B Jan. 27, 2024, 3:48 p.m. OK PyPy 3-64 TESTS 99 1700 66048000
243593464 sansen B Jan. 27, 2024, 3:16 p.m. OK Rust 2021 TESTS 99 546 97177600

remove filters

Back to search problems