Codeforces Round 743 (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
1572 Codeforces Round 743 (Div. 1) FINISHED False 7200 105290663 Sept. 18, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 286 ) F Stations PROGRAMMING data structures 3400

B'There are n cities in a row numbered from 1 to n . The cities will be building broadcasting stations. The station in the i -th city has height h_i and range w_i . It can broadcast information to city j if the following constraints are met: At the beginning, for every city i , h_i = 0 and w_i = i . Then q events will take place. During i -th event one of the following will happen: Your task is to react to all events and print answers to all queries. The first line contains two integers n and q ( 1 <= n, q <= 2 cdot10^5 ) -- number of cities and number of events. Then q lines follow. The i -th line begins with an integer p_i ( p_i = 1 or p_i = 2 ). If p_i = 1 a station will be rebuilt. Then two integers c_i and g_i ( 1 <= c_i <= g_i <= n ) follow -- the city in which the station is rebuilt and its new broadcasting range. If p_i = 2 you are given a query. Then two integers l_i and r_i ( 1 <= l_i <= r_i <= n ) follow -- the range of cities in the query. For each query, print in a single line the sum of b_j over the given interval. In the first test case, only station 1 reaches city 1 before and after it is rebuilt. In the second test case, after each rebuild, the array b looks as follows: '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
129198897 TadijaSebez F Sept. 18, 2021, 3:55 p.m. OK GNU C++14 TESTS 100 1356 22937600 3400
129212539 never_giveup F Sept. 18, 2021, 6:32 p.m. OK GNU C++17 TESTS 100 967 26214400 3400
129208785 ecnerwala F Sept. 18, 2021, 5:39 p.m. OK GNU C++17 (64) TESTS 100 405 13107200 3400
129202453 ecnerwala F Sept. 18, 2021, 4:11 p.m. OK GNU C++17 (64) TESTS 100 498 14745600 3400
129208917 fmota F Sept. 18, 2021, 5:40 p.m. OK GNU C++17 (64) TESTS 100 763 30003200 3400
129209541 Benq F Sept. 18, 2021, 5:47 p.m. OK GNU C++17 (64) TESTS 100 857 16896000 3400
129209583 Benq F Sept. 18, 2021, 5:48 p.m. OK GNU C++17 (64) TESTS 100 888 16896000 3400
129208842 fmota F Sept. 18, 2021, 5:39 p.m. OK GNU C++17 (64) TESTS 100 982 31539200 3400
129211853 maroonrk F Sept. 18, 2021, 6:22 p.m. OK GNU C++17 (64) TESTS 100 1076 29388800 3400
129216152 neal F Sept. 18, 2021, 7:32 p.m. OK GNU C++17 (64) TESTS 100 1481 44441600 3400
129216893 neal F Sept. 18, 2021, 7:46 p.m. OK GNU C++17 (64) TESTS 100 1528 44441600 3400
129193790 neal F Sept. 18, 2021, 3:29 p.m. OK GNU C++17 (64) TESTS 100 1543 46489600 3400

remove filters

Back to search problems