Educational Codeforces Round 150 (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
1841 Educational Codeforces Round 150 (Rated for Div. 2) FINISHED False 7200 50685863 June 12, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 511 ) F Monocarp and a Strategic Game PROGRAMMING dp geometry sortings

B"Monocarp plays a strategic computer game in which he develops a city. The city is inhabited by creatures of four different races -- humans, elves, orcs, and dwarves. Each inhabitant of the city has a happiness value, which is an integer. It depends on how many creatures of different races inhabit the city. Specifically, the happiness of each inhabitant is 0 by default; it increases by 1 for each other creature of the same race and decreases by 1 for each creature of a hostile race. Humans are hostile to orcs (and vice versa), and elves are hostile to dwarves (and vice versa). At the beginning of the game, Monocarp's city is not inhabited by anyone. During the game, n groups of creatures will come to his city, wishing to settle there. The i -th group consists of a_i humans, b_i orcs, c_i elves, and d_i dwarves. Each time, Monocarp can either accept the entire group of creatures into the city, or reject the entire group. The game calculates Monocarp's score according to the following formula: m + k , where m is the number of inhabitants in the city, and k is the sum of the happiness values of all creatures in the city. Help Monocarp earn the maximum possible number of points by the end of the game! The first line contains an integer n ( 1 <= q n <= q 3 cdot 10^{5} ) -- the number of groups of creatures that come to Monocarp's city. Then n lines follow. The i -th of them contains four integers a_i , b_i , c_i , and d_i ( 0 <= q a_i, b_i, c_i, d_i <= q 10^{9} ) -- the number of humans, orcs, elves and dwarves (respectively) in the i -th group. Output a single number -- the maximum score Monocarp can have by the end of the game. Your answer will be considered correct if its absolute or relative error does not exceed 10^{-9} . That is, if your answer is a , and the jury's answer is b , then the solution will be accepted if "...

Tutorials

117262

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
209494606 omeganot F June 12, 2023, 8:06 p.m. OK GNU C++14 TESTS 70 389 6348800
209474085 Potassium F June 12, 2023, 4:43 p.m. OK GNU C++14 TESTS 70 420 12697600
209519620 Luca F June 13, 2023, 5:20 a.m. OK GNU C++17 TESTS 70 311 9625600
209517601 Luca F June 13, 2023, 4:41 a.m. OK GNU C++17 TESTS 70 312 9625600
209479454 liympanda F June 12, 2023, 5:18 p.m. OK GNU C++17 TESTS 70 312 30310400
209494854 patou F June 12, 2023, 8:10 p.m. OK GNU C++17 TESTS 70 467 5734400
209481538 El3ageed_Abu_Shehab F June 12, 2023, 5:36 p.m. OK GNU C++17 TESTS 70 483 6144000
209522145 NotOnlySuccess F June 13, 2023, 5:55 a.m. OK GNU C++17 TESTS 70 561 78131200
209510919 jdurie F June 13, 2023, 2:44 a.m. OK GNU C++17 TESTS 70 655 14438400
209470507 penguinhacker F June 12, 2023, 4:32 p.m. OK GNU C++17 TESTS 70 873 25292800
209504713 Alex_Wei F June 13, 2023, 12:31 a.m. OK GNU C++17 (64) TESTS 70 280 10649600
209475062 SSRS_ F June 12, 2023, 4:49 p.m. OK GNU C++17 (64) TESTS 70 296 13721600
209516266 chappy1 F June 13, 2023, 4:18 a.m. OK GNU C++17 (64) TESTS 70 311 26214400
209486693 mattagar6 F June 12, 2023, 6:26 p.m. OK GNU C++17 (64) TESTS 70 342 48844800
209522649 Pointy F June 13, 2023, 6:01 a.m. OK GNU C++17 (64) TESTS 70 405 51507200
209491631 Bucketsmith F June 12, 2023, 7:23 p.m. OK GNU C++17 (64) TESTS 70 452 84787200
209482565 MarcosK F June 12, 2023, 5:46 p.m. OK GNU C++17 (64) TESTS 70 499 38502400
209510059 Orz_The_Moon F June 13, 2023, 2:31 a.m. OK GNU C++17 (64) TESTS 70 858 32051200
209475933 rniya F June 12, 2023, 4:54 p.m. OK GNU C++17 (64) TESTS 70 951 26316800
209481569 maspy F June 12, 2023, 5:37 p.m. OK GNU C++20 (64) TESTS 70 124 21196800
209480988 maspy F June 12, 2023, 5:31 p.m. OK GNU C++20 (64) TESTS 70 140 21196800
209511574 KING_OF_TURTLE F June 13, 2023, 2:56 a.m. OK GNU C++20 (64) TESTS 70 202 7372800
209486319 x86-cake F June 12, 2023, 6:22 p.m. OK GNU C++20 (64) TESTS 70 217 13721600
209490212 A_G F June 12, 2023, 7:05 p.m. OK GNU C++20 (64) TESTS 70 218 2457600
209486054 x86-cake F June 12, 2023, 6:20 p.m. OK GNU C++20 (64) TESTS 70 218 7372800
209501105 menezesd F June 12, 2023, 10:25 p.m. OK GNU C++20 (64) TESTS 70 233 13721600
209479058 dreamoon_love_AA F June 12, 2023, 5:15 p.m. OK GNU C++20 (64) TESTS 70 233 16793600
209486469 x86-cake F June 12, 2023, 6:24 p.m. OK GNU C++20 (64) TESTS 70 234 13721600
209483636 -1e11 F June 12, 2023, 5:56 p.m. OK GNU C++20 (64) TESTS 70 234 13721600

remove filters

Back to search problems