Educational Codeforces Round 164 (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
1954 Educational Codeforces Round 164 (Rated for Div. 2) FINISHED False 7200 24247463 April 12, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6469 ) D Colored Balls PROGRAMMING combinatorics dp greedy math sortings

B"There are balls of n different colors; the number of balls of the i -th color is a_i . The balls can be combined into groups. Each group should contain at most 2 balls, and no more than 1 ball of each color. Consider all 2^n sets of colors. For a set of colors, let's denote its value as the minimum number of groups the balls of those colors can be distributed into. For example, if there are three colors with 3 , 1 and 7 balls respectively, they can be combined into 7 groups (and not less than 7 ), so the value of that set of colors is 7 . Your task is to calculate the sum of values over all 2^n possible sets of colors. Since the answer may be too large, print it modulo 998 ,244 ,353 . The first line contains a single integer n ( 1 <= n <= 5000 ) -- the number of colors. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 5000 ) -- the number of balls of the i -th color. Additional constraint on input: the total number of balls doesn't exceed 5000 . Print a single integer -- the sum of values of all 2^n sets of colors, taken modulo 998 ,244 ,353 . Consider the first example. There are 8 sets of colors: So, the sum of values over all 2^n sets of colors is 11 . "...

Tutorials

Educational Codeforces Round 164 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
256403611 karamkontar D April 13, 2024, 4:24 a.m. OK C# 10 TESTS 25 405 406220800
256373825 ilyarybin D April 12, 2024, 7:20 p.m. OK C# 10 TESTS 25 827 8499200
256353477 shironeko1702 D April 12, 2024, 4:39 p.m. OK C++14 (GCC 6-32) TESTS 25 93 204800
256354868 JiangSY D April 12, 2024, 4:46 p.m. OK C++14 (GCC 6-32) TESTS 25 186 307200
256350562 HUSTACM D April 12, 2024, 4:32 p.m. OK C++14 (GCC 6-32) TESTS 25 311 102400
256375608 unarch D April 12, 2024, 7:39 p.m. OK C++14 (GCC 6-32) TESTS 25 327 102400
256363185 Sheep_lazy D April 12, 2024, 5:42 p.m. OK C++14 (GCC 6-32) TESTS 25 327 102400
256399874 adhklp D April 13, 2024, 3:25 a.m. OK C++14 (GCC 6-32) TESTS 25 328 0
256353089 mkangelo D April 12, 2024, 4:38 p.m. OK C++14 (GCC 6-32) TESTS 25 342 102400
256396677 sybsyb D April 13, 2024, 2:28 a.m. OK C++14 (GCC 6-32) TESTS 25 343 102400
256362832 Sid2307 D April 12, 2024, 5:39 p.m. OK C++14 (GCC 6-32) TESTS 25 358 102400
256354130 Khawaja_ D April 12, 2024, 4:43 p.m. OK C++14 (GCC 6-32) TESTS 25 374 0
256378479 alpha_geek D April 12, 2024, 8:12 p.m. OK C++17 (GCC 7-32) TESTS 25 46 102400
256354544 2024_how_to_practice D April 12, 2024, 4:45 p.m. OK C++17 (GCC 7-32) TESTS 25 62 0
256359762 andrewtam D April 12, 2024, 5:15 p.m. OK C++17 (GCC 7-32) TESTS 25 77 102400
256359565 andrewtam D April 12, 2024, 5:14 p.m. OK C++17 (GCC 7-32) TESTS 25 77 102400
256410812 MONISM D April 13, 2024, 5:57 a.m. OK C++17 (GCC 7-32) TESTS 25 124 102400
256399090 FangYifan D April 13, 2024, 3:12 a.m. OK C++17 (GCC 7-32) TESTS 25 124 1638400
256396384 FangYifan D April 13, 2024, 2:22 a.m. OK C++17 (GCC 7-32) TESTS 25 124 1638400
256396310 FangYifan D April 13, 2024, 2:20 a.m. OK C++17 (GCC 7-32) TESTS 25 124 1638400
256357428 FangYifan D April 12, 2024, 5 p.m. OK C++17 (GCC 7-32) TESTS 25 124 1638400
256353265 dontforgetyourself D April 12, 2024, 4:38 p.m. OK C++17 (GCC 7-32) TESTS 25 124 201216000
256362350 fzcdream D April 12, 2024, 5:35 p.m. OK C++20 (GCC 13-64) TESTS 25 46 0
256356202 Desh01 D April 12, 2024, 4:53 p.m. OK C++20 (GCC 13-64) TESTS 25 46 0
256409251 fireinferno D April 13, 2024, 5:38 a.m. OK C++20 (GCC 13-64) TESTS 25 46 102400
256362660 fzcdream D April 12, 2024, 5:38 p.m. OK C++20 (GCC 13-64) TESTS 25 46 102400
256388412 guperman D April 12, 2024, 11:03 p.m. OK C++20 (GCC 13-64) TESTS 25 61 0
256358105 Desh01 D April 12, 2024, 5:04 p.m. OK C++20 (GCC 13-64) TESTS 25 61 0
256357627 Desh01 D April 12, 2024, 5:01 p.m. OK C++20 (GCC 13-64) TESTS 25 61 0
256355394 Desh01 D April 12, 2024, 4:49 p.m. OK C++20 (GCC 13-64) TESTS 25 61 102400
256355490 glllll D April 12, 2024, 4:49 p.m. OK C++20 (GCC 13-64) TESTS 25 62 0
256393948 Saquariu D April 13, 2024, 1:28 a.m. OK C++20 (GCC 13-64) TESTS 25 62 102400
256350767 Kalia_H D April 12, 2024, 4:32 p.m. OK GNU C11 TESTS 25 343 102400
256399655 north_069 D April 13, 2024, 3:21 a.m. OK Go TESTS 25 155 307200
256350288 north_069 D April 12, 2024, 4:31 p.m. OK Go TESTS 25 421 4915200
256400913 xiao___Y D April 13, 2024, 3:42 a.m. OK Go TESTS 25 484 307200
256381746 lunchbox D April 12, 2024, 8:57 p.m. OK Java 21 TESTS 25 436 1331200
256358066 Shashwata_32 D April 12, 2024, 5:04 p.m. OK Java 21 TESTS 25 624 921600
256349912 rishi.mandloi09 D April 12, 2024, 4:31 p.m. OK Java 21 TESTS 25 639 1024000
256355266 jitu70337 D April 12, 2024, 4:48 p.m. OK Java 21 TESTS 25 640 1228800
256350170 dineshdcoc D April 12, 2024, 4:31 p.m. OK Java 21 TESTS 25 655 1843200
256351305 xobe19 D April 12, 2024, 4:33 p.m. OK Java 21 TESTS 25 749 614400
256384054 SD125 D April 12, 2024, 9:33 p.m. OK Java 21 TESTS 25 780 819200
256351702 shahbaz42 D April 12, 2024, 4:34 p.m. OK Java 21 TESTS 25 796 1228800
256359294 BlizGale D April 12, 2024, 5:12 p.m. OK Java 21 TESTS 25 936 281702400
256410385 amit_roy D April 13, 2024, 5:52 a.m. OK Java 21 TESTS 25 1030 921600
256396980 cc4414 D April 13, 2024, 2:33 a.m. OK Java 8 TESTS 25 139 0
256391799 dark_knight_5656 D April 13, 2024, 12:35 a.m. OK Java 8 TESTS 25 499 0
256391982 dark_knight_5656 D April 13, 2024, 12:40 a.m. OK Java 8 TESTS 25 577 143564800
256349542 sancxo. D April 12, 2024, 4:30 p.m. OK Java 8 TESTS 25 718 0
256352024 NavneetKumar123 D April 12, 2024, 4:34 p.m. OK Java 8 TESTS 25 765 0
256370465 SkadiTheCorruptHeart D April 12, 2024, 6:46 p.m. OK Java 8 TESTS 25 937 264192000
256408222 kasiru_69 D April 13, 2024, 5:27 a.m. OK Java 8 TESTS 25 1014 0
256374504 golions D April 12, 2024, 7:27 p.m. OK Java 8 TESTS 25 1171 262348800
256359108 wat2 D April 12, 2024, 5:11 p.m. OK Java 8 TESTS 25 1436 276480000
256374365 Java_Programmer D April 12, 2024, 7:25 p.m. OK Java 8 TESTS 25 1562 252518400
256352585 Samyak_15 D April 12, 2024, 4:36 p.m. OK PyPy 3 TESTS 25 1218 3993600
256350109 khnhcodingkarlo D April 12, 2024, 4:31 p.m. OK PyPy 3 TESTS 25 1390 3072000
256353645 jvatsal0709 D April 12, 2024, 4:40 p.m. OK PyPy 3 TESTS 25 1780 9625600
256409719 r-tron18 D April 13, 2024, 5:44 a.m. OK PyPy 3 TESTS 25 1905 103424000
256363045 OLOGY D April 12, 2024, 5:41 p.m. OK PyPy 3-64 TESTS 25 171 7884800
256365804 OLOGY D April 12, 2024, 6:04 p.m. OK PyPy 3-64 TESTS 25 186 7270400
256368004 OLOGY D April 12, 2024, 6:23 p.m. OK PyPy 3-64 TESTS 25 186 7372800
256367314 golomb D April 12, 2024, 6:18 p.m. OK PyPy 3-64 TESTS 25 187 3993600
256368242 sushmanth.dampur8780 D April 12, 2024, 6:26 p.m. OK PyPy 3-64 TESTS 25 187 6144000
256368365 sushmanth.dampur8780 D April 12, 2024, 6:27 p.m. OK PyPy 3-64 TESTS 25 203 6348800
256353695 mikeac D April 12, 2024, 4:40 p.m. OK PyPy 3-64 TESTS 25 233 2867200
256352118 andrei_rc D April 12, 2024, 4:34 p.m. OK PyPy 3-64 TESTS 25 234 9728000
256387973 samchen123 D April 12, 2024, 10:53 p.m. OK PyPy 3-64 TESTS 25 249 3072000
256409629 voicon D April 13, 2024, 5:43 a.m. OK PyPy 3-64 TESTS 25 250 4096000
256350446 ub_01 D April 12, 2024, 4:32 p.m. OK Rust 2021 TESTS 25 155 102400
256350992 Karan_14 D April 12, 2024, 4:32 p.m. OK Scala TESTS 25 1437 307200

remove filters

Back to search problems