Codeforces Round 449 (Div. 1)

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
896 Codeforces Round 449 (Div. 1) FINISHED False 8100 225302124 Dec. 2, 2017, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 543 ) D Nephren Runs a Cinema PROGRAMMING chinese remainder theorem combinatorics math number theory 2800

B"Lakhesh loves to make movies, so Nephren helps her run a cinema. We may call it No. 68 Cinema. However, one day, the No. 68 Cinema runs out of changes (they don't have 50-yuan notes currently), but Nephren still wants to start their business. (Assume that yuan is a kind of currency in Regulu Ere.) There are three types of customers: some of them bring exactly a 50-yuan note; some of them bring a 100-yuan note and Nephren needs to give a 50-yuan note back to him/her; some of them bring VIP cards so that they don't need to pay for the ticket. Now n customers are waiting outside in queue. Nephren wants to know how many possible queues are there that they are able to run smoothly (i.e. every customer can receive his/her change), and that the number of 50-yuan notes they have after selling tickets to all these customers is between l and r, inclusive. Two queues are considered different if there exists a customer whose type is different in two queues. As the number can be large, please output the answer modulo p. One line containing four integers n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), p (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7109), l and r (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). One line indicating the answer modulo p. We use A, B and C to indicate customers with 50-yuan notes, customers with 100-yuan notes and customers with VIP cards respectively. For the first sample, the different possible queues that there are 2 50-yuan notes left are AAAB, AABA, ABAA, AACC, ACAC, ACCA, CAAC, CACA and CCAA, and the different possible queues that there are 3 50-yuan notes left are AAAC, AACA, ACAA and CAAA. So there are 13 different queues satisfying the first sample. Similarly, there are 35 different queues satisfying the second sample. "...

Tutorials

Codeforces Round #449 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
32889467 djq_cpp D Dec. 3, 2017, 3:31 a.m. OK GNU C++ TESTS 56 124 5324800 2800
35462911 luogu_bot4 D Feb. 19, 2018, 6:04 a.m. OK GNU C++ TESTS 56 124 5427200 2800
32998725 vjudge1 D Dec. 7, 2017, 11:15 a.m. OK GNU C++ TESTS 56 140 23040000 2800
32880432 zx2003 D Dec. 2, 2017, 5:38 p.m. OK GNU C++ TESTS 56 156 7475200 2800
34790687 luogu_bot1 D Feb. 1, 2018, 5:48 a.m. OK GNU C++ TESTS 56 156 11161600 2800
32998670 vjudge5 D Dec. 7, 2017, 11:13 a.m. OK GNU C++ TESTS 56 156 23040000 2800
32887856 VPigeonKing D Dec. 3, 2017, 1:09 a.m. OK GNU C++ TESTS 56 171 27750400 2800
32895761 nwi D Dec. 3, 2017, 10:01 a.m. OK GNU C++ TESTS 56 249 8704000 2800
33283929 vjudge1 D Dec. 16, 2017, 8:25 a.m. OK GNU C++ TESTS 56 264 11878400 2800
33370049 F.Darcy D Dec. 18, 2017, 6:28 a.m. OK GNU C++ TESTS 56 312 21299200 2800
32957236 aurinegro D Dec. 5, 2017, 7:59 p.m. OK GNU C++11 TESTS 56 46 10854400 2800
32957057 aurinegro D Dec. 5, 2017, 7:48 p.m. OK GNU C++11 TESTS 56 46 10854400 2800
32894182 Marco_L_T D Dec. 3, 2017, 8:31 a.m. OK GNU C++11 TESTS 56 46 17305600 2800
41581878 yzh666 D Aug. 14, 2018, 8:32 a.m. OK GNU C++11 TESTS 56 61 8806400 2800
57828831 Hazyknight D July 27, 2019, 5:08 a.m. OK GNU C++11 TESTS 56 62 1228800 2800
32984204 PlayfulPanda D Dec. 6, 2017, 6:09 p.m. OK GNU C++11 TESTS 56 62 7782400 2800
32976977 jxt1 D Dec. 6, 2017, 1:25 p.m. OK GNU C++11 TESTS 56 78 206643200 2800
32972038 Feeey D Dec. 6, 2017, 10:35 a.m. OK GNU C++11 TESTS 56 78 206643200 2800
50674210 2398886573 D March 2, 2019, 8:28 a.m. OK GNU C++11 TESTS 56 109 6860800 2800
32956703 aurinegro D Dec. 5, 2017, 7:24 p.m. OK GNU C++11 TESTS 56 109 6860800 2800
32894122 Marco_L_T D Dec. 3, 2017, 8:28 a.m. OK GNU C++14 TESTS 56 46 17100800 2800
40979012 ReaLNero1 D July 30, 2018, 4:54 p.m. OK GNU C++14 TESTS 56 62 15257600 2800
32880210 akashdeep D Dec. 2, 2017, 5:33 p.m. OK GNU C++14 TESTS 56 78 15564800 2800
47317921 kazuma D Dec. 21, 2018, 5:41 a.m. OK GNU C++14 TESTS 56 93 11059200 2800
32894045 Marco_L_T D Dec. 3, 2017, 8:24 a.m. OK GNU C++14 TESTS 56 109 8294400 2800
53666321 RNS_CUS D May 2, 2019, 10:38 a.m. OK GNU C++14 TESTS 56 124 5632000 2800
32918346 zy1997 D Dec. 4, 2017, 10:53 a.m. OK GNU C++14 TESTS 56 139 16076800 2800
32917278 black_horse2014 D Dec. 4, 2017, 9:48 a.m. OK GNU C++14 TESTS 56 140 6348800 2800
32882890 dreamoon_love_AA D Dec. 2, 2017, 7:02 p.m. OK GNU C++14 TESTS 56 140 7475200 2800
42799774 Samaritan123 D Sept. 12, 2018, 1:40 p.m. OK GNU C++14 TESTS 56 140 9113600 2800
50628037 luogu_bot1 D March 1, 2019, 7:22 a.m. OK GNU C++17 TESTS 56 46 9216000 2800
50627977 374272 D March 1, 2019, 7:20 a.m. OK GNU C++17 TESTS 56 61 9216000 2800
53200286 Excogitatoris D April 23, 2019, 5:24 p.m. OK GNU C++17 TESTS 56 62 7884800 2800
53200699 Excogitatoris D April 23, 2019, 5:39 p.m. OK GNU C++17 TESTS 56 77 7884800 2800
53200490 Excogitatoris D April 23, 2019, 5:32 p.m. OK GNU C++17 TESTS 56 77 7884800 2800
53200581 Excogitatoris D April 23, 2019, 5:35 p.m. OK GNU C++17 TESTS 56 78 7884800 2800
53200440 Excogitatoris D April 23, 2019, 5:30 p.m. OK GNU C++17 TESTS 56 78 7884800 2800
53200194 Excogitatoris D April 23, 2019, 5:20 p.m. OK GNU C++17 TESTS 56 78 7884800 2800
68230343 hjk1030 D Jan. 5, 2020, 8:56 a.m. OK GNU C++17 TESTS 56 124 18432000 2800
50629525 iftest614 D March 1, 2019, 8:18 a.m. OK GNU C++17 TESTS 56 139 8806400 2800
33279996 tri D Dec. 16, 2017, 3:20 a.m. OK Java 8 TESTS 56 186 27443200 2800
32881282 mmaxio D Dec. 2, 2017, 5:57 p.m. OK Java 8 TESTS 56 311 20684800 2800
33880586 tmwilliamlin168 D Jan. 3, 2018, 8:22 a.m. OK Java 8 TESTS 56 577 27750400 2800
32916470 19891101 D Dec. 4, 2017, 9:03 a.m. OK Java 8 TESTS 56 686 21094400 2800
32895169 19891101 D Dec. 3, 2017, 9:28 a.m. OK Java 8 TESTS 56 1326 28160000 2800
32895127 19891101 D Dec. 3, 2017, 9:26 a.m. OK Java 8 TESTS 56 1341 28160000 2800
34880111 iamavalon D Feb. 3, 2018, 2:18 a.m. OK Java 8 TESTS 56 1497 101990400 2800
47868065 vjudge2 D Jan. 3, 2019, 11:08 a.m. OK MS C++ TESTS 56 218 5120000 2800
32881096 LLI_E_P_JI_O_K D Dec. 2, 2017, 5:51 p.m. OK MS C++ TESTS 56 1185 9830400 2800

remove filters

Back to search problems