Codeforces Round 258 (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
451 Codeforces Round 258 (Div. 2) FINISHED False 7200 331309823 July 24, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3751 ) E Devu and Flowers PROGRAMMING bitmasks combinatorics number theory 2400

B'Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single box are of the same color (hence they are indistinguishable). Also, no two boxes have flowers of the same color. Now Devu wants to select exactly s flowers from the boxes to decorate his garden. Devu would like to know, in how many different ways can he select the flowers from each box? Since this number may be very large, he asks you to find the number modulo (109 xe2 x80 x89+ xe2 x80 x897). Devu considers two ways different if there is at least one box from which different number of flowers are selected in these two ways. The first line of input contains two space-separated integers n and s (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8920, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89s xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891014). The second line contains n space-separated integers f1, xe2 x80 x89f2, xe2 x80 x89... fn (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89fi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891012). Output a single integer -- the number of ways in which Devu can select the flowers modulo (109 xe2 x80 x89+ xe2 x80 x897). Sample 1. There are two ways of selecting 3 flowers: {1, xe2 x80 x892} and {0, xe2 x80 x893}. Sample 2. There is only one way of selecting 4 flowers: {2, xe2 x80 x892}. Sample 3. There are three ways of selecting 5 flowers: {1, xe2 x80 x892, xe2 x80 x892}, {0, xe2 x80 x893, xe2 x80 x892}, and {1, xe2 x80 x893, xe2 x80 x891}.'...

Tutorials

Codeforces Round #258 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56966553 vjudge2 E July 13, 2019, 8:33 a.m. OK Clang++17 Diagnostics TESTS 72 1169 0 2400
40988204 ReaLNero1 E July 30, 2018, 9:48 p.m. OK GNU C++ TESTS 72 234 0 2400
40638066 luogu_bot2 E July 22, 2018, 2:07 p.m. OK GNU C++ TESTS 72 312 0 2400
41934143 vjudge2 E Aug. 21, 2018, 12:01 p.m. OK GNU C++ TESTS 72 343 0 2400
35128437 vjudge5 E Feb. 10, 2018, 2:49 p.m. OK GNU C++ TESTS 72 343 18841600 2400
41897192 luogu_bot5 E Aug. 20, 2018, 10:09 a.m. OK GNU C++ TESTS 72 358 0 2400
38432112 cyc4188 E May 19, 2018, 1:24 p.m. OK GNU C++ TESTS 72 358 0 2400
37440472 vjudge5 E April 18, 2018, 2:41 p.m. OK GNU C++ TESTS 72 358 3788800 2400
38102275 Jonothor_Darry E May 10, 2018, 10:23 p.m. OK GNU C++ TESTS 72 374 36966400 2400
42231361 vjudge5 E Aug. 29, 2018, 6:52 a.m. OK GNU C++ TESTS 72 390 0 2400
35200514 cigam E Feb. 13, 2018, 1:36 p.m. OK GNU C++ TESTS 72 390 2048000 2400
54075065 about E May 13, 2019, 7:10 p.m. OK GNU C11 TESTS 72 374 0 2400
61328407 rainboy E Sept. 26, 2019, 2:19 p.m. OK GNU C11 TESTS 72 592 0 2400
55291036 star_magic_young E June 8, 2019, 7:42 a.m. OK GNU C++11 TESTS 72 264 16793600 2400
66533092 John_zyj E Dec. 9, 2019, 8:22 a.m. OK GNU C++11 TESTS 72 265 0 2400
55291014 star_magic_young E June 8, 2019, 7:41 a.m. OK GNU C++11 TESTS 72 265 16793600 2400
53484076 lb2003 E April 29, 2019, 12:41 a.m. OK GNU C++11 TESTS 72 280 0 2400
53484625 lb2003 E April 29, 2019, 1:42 a.m. OK GNU C++11 TESTS 72 280 0 2400
53490063 Rubbish12345 E April 29, 2019, 7:55 a.m. OK GNU C++11 TESTS 72 280 16793600 2400
54846088 vjudge1 E May 30, 2019, 1:58 p.m. OK GNU C++11 TESTS 72 296 0 2400
53274566 luogu_bot1 E April 25, 2019, 8:39 a.m. OK GNU C++11 TESTS 72 296 0 2400
57083264 luogu_bot1 E July 15, 2019, 7:55 a.m. OK GNU C++11 TESTS 72 296 0 2400
62618733 luogu_bot4 E Oct. 15, 2019, 12:13 p.m. OK GNU C++11 TESTS 72 296 0 2400
44477409 hungry_fool E Oct. 18, 2018, 9:43 a.m. OK GNU C++14 TESTS 72 295 4812800 2400
54651538 vjudge3 E May 26, 2019, 5:45 a.m. OK GNU C++14 TESTS 72 296 0 2400
69216243 NaimSS E Jan. 21, 2020, 1 a.m. OK GNU C++14 TESTS 72 296 0 2400
54473678 LiSA E May 22, 2019, 7:08 a.m. OK GNU C++14 TESTS 72 296 25292800 2400
45202028 ArshiaDadras E Nov. 2, 2018, 10:36 a.m. OK GNU C++14 TESTS 72 311 0 2400
57086692 vjudge1 E July 15, 2019, 9:08 a.m. OK GNU C++14 TESTS 72 311 0 2400
57086761 vjudge3 E July 15, 2019, 9:10 a.m. OK GNU C++14 TESTS 72 312 0 2400
57087435 vjudge5 E July 15, 2019, 9:26 a.m. OK GNU C++14 TESTS 72 312 0 2400
58386440 ctlchild E Aug. 6, 2019, 12:08 p.m. OK GNU C++14 TESTS 72 312 0 2400
58151294 beginend E Aug. 2, 2019, 2:45 a.m. OK GNU C++14 TESTS 72 312 0 2400
55291226 vjudge3 E June 8, 2019, 7:48 a.m. OK GNU C++17 TESTS 72 265 16793600 2400
53276967 luogu_bot5 E April 25, 2019, 9:59 a.m. OK GNU C++17 TESTS 72 280 0 2400
53276998 luogu_bot2 E April 25, 2019, 10:01 a.m. OK GNU C++17 TESTS 72 280 0 2400
53277047 luogu_bot3 E April 25, 2019, 10:02 a.m. OK GNU C++17 TESTS 72 280 0 2400
53276877 luogu_bot4 E April 25, 2019, 9:56 a.m. OK GNU C++17 TESTS 72 296 0 2400
49398461 Trote_w E Feb. 3, 2019, 1:32 p.m. OK GNU C++17 TESTS 72 296 307200 2400
46463222 Martin53 E Dec. 1, 2018, 10:25 p.m. OK GNU C++17 TESTS 72 311 0 2400
46848542 zjc0201 E Dec. 10, 2018, 11:07 a.m. OK GNU C++17 TESTS 72 311 33587200 2400
45705705 Pakalns E Nov. 14, 2018, 11:27 a.m. OK GNU C++17 TESTS 72 312 0 2400
52669020 luogu_bot4 E April 13, 2019, 6:30 a.m. OK GNU C++17 TESTS 72 312 0 2400
54262338 alphacarrot E May 17, 2019, 3:04 a.m. OK Java 8 TESTS 72 624 0 2400
41758292 vjudge3 E Aug. 18, 2018, 1:14 p.m. OK Java 8 TESTS 72 670 0 2400
40679118 Harpae E July 23, 2018, 5:36 p.m. OK Java 8 TESTS 72 982 0 2400
61328406 Dukkha E Sept. 26, 2019, 2:19 p.m. OK Java 8 TESTS 72 1045 0 2400
56055926 AryssonFigueiredo E June 25, 2019, 11:35 p.m. OK Java 8 TESTS 72 1668 0 2400
40679026 Harpae E July 23, 2018, 5:33 p.m. OK Java 8 TESTS 72 3650 5734400 2400
57083286 vjudge1 E July 15, 2019, 7:55 a.m. OK MS C++ TESTS 72 421 0 2400
52672793 vjudge4 E April 13, 2019, 8:16 a.m. OK MS C++ TESTS 72 451 20070400 2400
57087413 vjudge3 E July 15, 2019, 9:26 a.m. OK MS C++ TESTS 72 452 0 2400
59091454 vjudge3 E Aug. 19, 2019, 12:52 p.m. OK MS C++ TESTS 72 452 20070400 2400
53845769 vjudge2 E May 7, 2019, 10:49 a.m. OK MS C++ TESTS 72 452 20070400 2400
68479799 vjudge5 E Jan. 10, 2020, 7:15 a.m. OK MS C++ TESTS 72 467 0 2400
58563540 vjudge3 E Aug. 11, 2019, 6:54 a.m. OK MS C++ TESTS 72 483 0 2400
52671750 vjudge1 E April 13, 2019, 7:53 a.m. OK MS C++ TESTS 72 483 0 2400
58389788 vjudge1 E Aug. 6, 2019, 1:17 p.m. OK MS C++ TESTS 72 498 0 2400
58907798 CoolKey E Aug. 16, 2019, 11:53 a.m. OK MS C++ TESTS 72 514 0 2400
64072675 CwithT E Nov. 2, 2019, 7:55 a.m. OK MS C++ 2017 TESTS 72 795 0 2400
58562635 vjudge2 E Aug. 11, 2019, 6:30 a.m. OK MS C++ 2017 TESTS 72 857 0 2400
58609628 denglu E Aug. 11, 2019, 2:02 p.m. OK MS C++ 2017 TESTS 72 1668 0 2400

remove filters

Back to search problems