Codeforces Round 528 (Div. 1, based on Technocup 2019 Elimination Round 4)

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
1086 Codeforces Round 528 (Div. 1, based on Technocup 2019 Elimination Round 4) FINISHED False 7200 186251099 Dec. 23, 2018, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 244 ) F Forest Fires PROGRAMMING math 3400

B"Berland forest was planted several decades ago in a formation of an infinite grid with a single tree in every cell. Now the trees are grown up and they form a pretty dense structure. So dense, actually, that the fire became a real danger for the forest. This season had been abnormally hot in Berland and some trees got caught on fire! The second fire started is considered the second 0 . Every second fire lit up all intact neightbouring trees to every currently burning tree. The tree is neighbouring if it occupies adjacent by side or by corner cell. Luckily, after t seconds Berland fire department finally reached the location of fire and instantaneously extinguished it all. Now they want to calculate the destructive power of the fire. Let val_{x, y} be the second the tree in cell (x, y) got caught on fire. The destructive power is the sum of val_{x, y} over all (x, y) of burnt trees. Clearly, all the workers of fire department are firefighters, not programmers, thus they asked you to help them calculate the destructive power of the fire. The result can be rather big, so print it modulo 998244353 . The first line contains two integers n and t ( 1 <= n <= 50 , 0 <= t <= 10^8 ) -- the number of trees that initially got caught on fire and the time fire department extinguished the fire, respectively. Each of the next n lines contains two integers x and y ( -10^8 <= x, y <= 10^8 ) -- the positions of trees that initially got caught on fire. Obviously, the position of cell (0, 0) on the grid and the directions of axes is irrelevant as the grid is infinite and the answer doesn't depend on them. It is guaranteed that all the given tree positions are pairwise distinct. The grid is infinite so the fire doesn't stop once it reaches -10^8 or 10^8 . It continues beyond these borders. Print a single integer -- the sum of val_{x, y} over all (x, y) of bu"...

Tutorials

Technocup 2019 — Elimination Round 4 + Codeforces Round 528: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
65521409 Sripriyan F Nov. 22, 2019, 8:30 a.m. OK GNU C++11 TESTS 56 61 0 3400
57734961 py_ultron F July 25, 2019, 9:40 a.m. OK GNU C++11 TESTS 56 62 0 3400
51925533 cuizhuyefei F March 28, 2019, 7:24 a.m. OK GNU C++11 TESTS 56 62 204800 3400
57867783 lopare F July 27, 2019, 10:36 p.m. OK GNU C++11 TESTS 56 77 0 3400
53706553 Mr_Spade F May 3, 2019, 1:30 p.m. OK GNU C++11 TESTS 56 78 0 3400
47707579 frodakcin F Dec. 29, 2018, 10:03 p.m. OK GNU C++11 TESTS 56 78 0 3400
58173534 BigBag F Aug. 2, 2019, 12:15 p.m. OK GNU C++11 TESTS 56 78 102400 3400
61752258 C20191629 F Oct. 3, 2019, 3:59 a.m. OK GNU C++11 TESTS 56 93 102400 3400
58116723 luogu_bot5 F Aug. 1, 2019, 9:07 a.m. OK GNU C++11 TESTS 56 93 102400 3400
55520780 Miracle_2001 F June 13, 2019, 8:22 a.m. OK GNU C++11 TESTS 56 93 102400 3400
49517481 thulasiramsan F Feb. 6, 2019, 4:51 a.m. OK GNU C++14 TESTS 56 46 0 3400
53715478 krijgertje F May 3, 2019, 6:41 p.m. OK GNU C++14 TESTS 56 46 204800 3400
48654225 ReaLNero1 F Jan. 21, 2019, 1:24 a.m. OK GNU C++14 TESTS 56 61 0 3400
48285899 tmwilliamlin168 F Jan. 12, 2019, 10:25 a.m. OK GNU C++14 TESTS 56 61 0 3400
48285591 tmwilliamlin168 F Jan. 12, 2019, 10:16 a.m. OK GNU C++14 TESTS 56 61 0 3400
48286044 tmwilliamlin168 F Jan. 12, 2019, 10:30 a.m. OK GNU C++14 TESTS 56 62 0 3400
60164386 Scut82 F Sept. 6, 2019, 10:18 a.m. OK GNU C++14 TESTS 56 77 0 3400
55993338 rainy_season F June 24, 2019, 8:55 a.m. OK GNU C++14 TESTS 56 93 0 3400
49833087 newbiegcz F Feb. 12, 2019, 2:49 p.m. OK GNU C++14 TESTS 56 140 204800 3400
53997279 latte0119 F May 11, 2019, 3:16 p.m. OK GNU C++14 TESTS 56 171 204800 3400
69596483 gongsuidashen F Jan. 27, 2020, 5:06 a.m. OK GNU C++17 TESTS 56 77 204800 3400
47665827 Benq F Dec. 28, 2018, 11:57 p.m. OK GNU C++17 TESTS 56 93 204800 3400
61752329 vjudge4 F Oct. 3, 2019, 4:01 a.m. OK GNU C++17 TESTS 56 109 102400 3400
47460282 user202729_ F Dec. 24, 2018, 2:43 p.m. OK GNU C++17 TESTS 56 249 409600 3400
66053585 ftiasch F Nov. 30, 2019, 6:31 p.m. OK GNU C++17 TESTS 56 358 0 3400
47456422 tfg F Dec. 24, 2018, 12:47 p.m. OK GNU C++17 TESTS 56 436 409600 3400
47429292 mnbvmar F Dec. 23, 2018, 3:33 p.m. OK GNU C++17 TESTS 56 436 409600 3400
47456341 tfg F Dec. 24, 2018, 12:45 p.m. OK GNU C++17 TESTS 56 451 409600 3400
47864866 FlappyFish F Jan. 3, 2019, 9:01 a.m. OK GNU C++17 TESTS 56 530 512000 3400
62575841 ak_taniya F Oct. 14, 2019, 3:52 p.m. OK GNU C++17 TESTS 56 545 204800 3400
61769148 vjudge4 F Oct. 3, 2019, 9:35 a.m. OK MS C++ TESTS 56 374 0 3400

remove filters

Back to search problems