Educational Codeforces Round 135 (Rated for 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
1728 Educational Codeforces Round 135 (Rated for Div. 2) FINISHED False 7200 69175499 Sept. 8, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 468 ) G Illumination PROGRAMMING combinatorics dp

B'Consider a segment [0, d] of the coordinate line. There are n lanterns and m points of interest in this segment. For each lantern, you can choose its power -- an integer between 0 and d (inclusive). A lantern with coordinate x illuminates the point of interest with coordinate y if |x - y| is less than or equal to the power of the lantern. A way to choose the power values for all lanterns is considered valid if every point of interest is illuminated by at least one lantern. You have to process q queries. Each query is represented by one integer f_i . To answer the i -th query, you have to: The first line contains three integers d , n and m ( 4 <= d <= 3 cdot 10^5 ; 1 <= n <= 2 cdot 10^5 ; 1 <= m <= 16 ) -- the size of the segment, the number of lanterns and the number of points of interest, respectively. The second line contains n integers l_1, l_2, ... , l_n ( 1 <= l_i <= d - 1 ), where l_i is the coordinate of the i -th lantern. The third line contains m integers p_1, p_2, ... , p_m ( 1 <= p_i <= d - 1 ), where p_i is the coordinate of the i -th point of interest. The fourth line contains one integer q ( 1 <= q <= 5 cdot 10^5 ) -- the number of queries. The fifth line contains q integers f_1, f_2, ... , f_q ( 1 <= f_i <= d - 1 ), where f_i is the integer representing the i -th query. Additional constraint on the input: during the processing of each query, no coordinate contains more than one object (i. xe2 x80 x89e. there cannot be two or more lanterns with the same coordinate, two or more points of interest with the same coordinate, or a lantern and a point of interest with the same coordinate). For each query, print one integer -- the answer to it, taken modulo 998244353 . '...

Tutorials

106805

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
171470230 themoon G Sept. 9, 2022, 5:45 a.m. OK GNU C++14 TESTS 55 670 2662400
171428047 Larry1010 G Sept. 8, 2022, 4:55 p.m. OK GNU C++14 TESTS 55 904 15052800
171465262 MatrixCascade_qwq G Sept. 9, 2022, 4:19 a.m. OK GNU C++14 TESTS 55 1403 16384000
171466951 grass8cow G Sept. 9, 2022, 4:52 a.m. OK GNU C++14 TESTS 55 1591 819200
171463425 Big_gold_date G Sept. 9, 2022, 3:39 a.m. OK GNU C++14 TESTS 55 1871 1331200
171459480 Big_gold_date G Sept. 9, 2022, 2:10 a.m. OK GNU C++14 TESTS 55 1871 1331200
171462747 Ruins G Sept. 9, 2022, 3:24 a.m. OK GNU C++17 TESTS 55 467 3174400
171437678 clonemasteruwu G Sept. 8, 2022, 6:22 p.m. OK GNU C++17 TESTS 55 482 32153600
171421745 Shiroqwq_ G Sept. 8, 2022, 4:30 p.m. OK GNU C++17 TESTS 55 483 115097600
171462982 Ruins G Sept. 9, 2022, 3:29 a.m. OK GNU C++17 TESTS 55 639 3174400
171449512 KrK G Sept. 8, 2022, 9:33 p.m. OK GNU C++17 TESTS 55 717 1433600
171471289 RABEYA_AKTER_LIMA G Sept. 9, 2022, 6 a.m. OK GNU C++17 TESTS 55 1232 105779200
171427756 abc864197532 G Sept. 8, 2022, 4:53 p.m. OK GNU C++17 TESTS 55 1949 163532800
171462635 kovi05007 G Sept. 9, 2022, 3:21 a.m. OK GNU C++17 TESTS 55 2636 464998400
171421667 anodiebird G Sept. 8, 2022, 4:30 p.m. OK GNU C++17 TESTS 55 3073 33689600
171458107 zhangshaojia G Sept. 9, 2022, 1:36 a.m. OK GNU C++17 TESTS 55 3556 1638400
171426382 rniya G Sept. 8, 2022, 4:45 p.m. OK GNU C++17 (64) TESTS 55 452 5632000
171459969 CharlesWuQiushi G Sept. 9, 2022, 2:22 a.m. OK GNU C++17 (64) TESTS 55 498 307200
171425286 Kirill22 G Sept. 8, 2022, 4:40 p.m. OK GNU C++17 (64) TESTS 55 545 819200
171424973 Kirill22 G Sept. 8, 2022, 4:38 p.m. OK GNU C++17 (64) TESTS 55 561 819200
171424864 Kirill22 G Sept. 8, 2022, 4:38 p.m. OK GNU C++17 (64) TESTS 55 577 819200
171421363 Kirill22 G Sept. 8, 2022, 4:30 p.m. OK GNU C++17 (64) TESTS 55 608 1638400
171458828 relyt871 G Sept. 9, 2022, 1:54 a.m. OK GNU C++17 (64) TESTS 55 639 2662400
171455644 wsyear G Sept. 9, 2022, 12:33 a.m. OK GNU C++17 (64) TESTS 55 670 1638400
171424661 noimi G Sept. 8, 2022, 4:37 p.m. OK GNU C++17 (64) TESTS 55 701 2969600
171427032 neal G Sept. 8, 2022, 4:49 p.m. OK GNU C++17 (64) TESTS 55 701 9318400
171454084 njwrz G Sept. 8, 2022, 11:45 p.m. OK GNU C++20 (64) TESTS 55 233 2048000
171429440 A_G G Sept. 8, 2022, 5:04 p.m. OK GNU C++20 (64) TESTS 55 295 819200
171419291 A_G G Sept. 8, 2022, 4:25 p.m. OK GNU C++20 (64) TESTS 55 327 1843200
171461202 Adam_GS G Sept. 9, 2022, 2:51 a.m. OK GNU C++20 (64) TESTS 55 327 2969600
171423625 Vercingetorix G Sept. 8, 2022, 4:34 p.m. OK GNU C++20 (64) TESTS 55 373 6041600
171456181 Bench0310 G Sept. 9, 2022, 12:46 a.m. OK GNU C++20 (64) TESTS 55 389 1126400
171446178 huangxiaohua G Sept. 8, 2022, 8:26 p.m. OK GNU C++20 (64) TESTS 55 451 94208000
171462243 huangxiaohua G Sept. 9, 2022, 3:14 a.m. OK GNU C++20 (64) TESTS 55 468 94208000
171419842 dengTianliang G Sept. 8, 2022, 4:27 p.m. OK GNU C++20 (64) TESTS 55 608 72294400
171463493 Forza_Ferrari G Sept. 9, 2022, 3:40 a.m. OK GNU C++20 (64) TESTS 55 623 819200
171443627 pva701 G Sept. 8, 2022, 7:43 p.m. OK Java 17 TESTS 55 1294 56729600

remove filters

Back to search problems