MemSQL Start[c]UP 3.0 - Round 2 (onsite finalists)

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
865 MemSQL Start[c]UP 3.0 - Round 2 (onsite finalists) FINISHED False 10800 269614523 Sept. 30, 2017, 5:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 163 ) G Flowers and Chocolate PROGRAMMING combinatorics math matrices 3200

It's Piegirl's birthday soon, and Pieguy has decided to buy her a bouquet of flowers and a basket of chocolates. The flower shop has F different types of flowers available. The i -th type of flower always has exactly p i petals. Pieguy has decided to buy a bouquet consisting of exactly N flowers. He may buy the same type of flower multiple times. The N flowers are then arranged into a bouquet. The position of the flowers within a bouquet matters. You can think of a bouquet as an ordered list of flower types. The chocolate shop sells chocolates in boxes. There are B different types of boxes available. The i -th type of box contains c i pieces of chocolate. Pieguy can buy any number of boxes, and can buy the same type of box multiple times. He will then place these boxes into a basket. The position of the boxes within the basket matters. You can think of the basket as an ordered list of box types. Pieguy knows that Piegirl likes to pluck a petal from a flower before eating each piece of chocolate. He would like to ensure that she eats the last piece of chocolate from the last box just after plucking the last petal from the last flower. That is, the total number of petals on all the flowers in the bouquet should equal the total number of pieces of chocolate in all the boxes in the basket. How many different bouquet+basket combinations can Pieguy buy? The answer may be very large, so compute it modulo 1000000007 = 10 9 + 7 . The first line of input will contain integers F , B , and N (1 ≤ F ≤ 10, 1 ≤ B ≤ 100, 1 ≤ N ≤ 10 18 ) , the number of types of flowers, the number of types of boxes, and the number of flowers that must go into the bouquet, respectively. The second line of input will contain F integers p 1 , p 2 , ..., p F (1 ≤ p i ≤ 10 9 ) , the numbers of petals on each of the flower types. The third line of input will contain B integers c 1 , c 2 , ..., c B (1 ≤ c i ≤ 250) , the number of pieces of chocolate in each of the box types. Print the number of

Tutorials

MemSQL Start[c]UP 3.0 Round 2 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
38790535 luogu_bot4 G May 31, 2018, 5:15 a.m. OK GNU C++ TESTS 19 390 3584000 3200
37385179 vjudge4 G April 17, 2018, 1:51 a.m. OK GNU C++ TESTS 19 592 3584000 3200
33523742 samjia2000 G Dec. 23, 2017, 3:17 a.m. OK GNU C++11 TESTS 19 187 6451200 3200
65735330 JCC_ G Nov. 26, 2019, 7:29 a.m. OK GNU C++11 TESTS 19 280 0 3200
57768919 py_ultron G July 25, 2019, 10:44 p.m. OK GNU C++11 TESTS 19 280 0 3200
57872983 lopare G July 28, 2019, 3:14 a.m. OK GNU C++11 TESTS 19 296 0 3200
42967700 zhouyuyang G Sept. 17, 2018, 2:58 a.m. OK GNU C++11 TESTS 19 390 0 3200
54329264 _twilight G May 18, 2019, 4:54 a.m. OK GNU C++11 TESTS 19 420 102400 3200
53311083 alonefight G April 26, 2019, 6:50 a.m. OK GNU C++11 TESTS 19 421 102400 3200
53309869 alonefight G April 26, 2019, 5:49 a.m. OK GNU C++11 TESTS 19 452 0 3200
30964423 krijgertje G Oct. 3, 2017, 10:27 a.m. OK GNU C++11 TESTS 19 546 0 3200
40575101 vjudge1 G July 20, 2018, 10:48 a.m. OK GNU C++11 TESTS 19 608 0 3200
40979601 ReaLNero1 G July 30, 2018, 5:09 p.m. OK GNU C++14 TESTS 19 78 7987200 3200
50456606 fireworkes G Feb. 24, 2019, 5:11 p.m. OK GNU C++14 TESTS 19 280 204800 3200
30915684 Kaimcoder G Oct. 1, 2017, 5:58 p.m. OK GNU C++14 TESTS 19 546 102400 3200
53473304 alan_cty G April 28, 2019, 1:57 p.m. OK GNU C++14 TESTS 19 685 0 3200
38781431 kut_kjb1994 G May 30, 2018, 5:45 p.m. OK GNU C++14 TESTS 19 763 3379200 3200
69951110 gongsuidashen G Feb. 1, 2020, 8:57 a.m. OK GNU C++17 TESTS 19 62 7987200 3200
49561798 Los_Angelos_Laycurse G Feb. 7, 2019, 12:56 p.m. OK GNU C++17 TESTS 19 202 307200 3200
49561861 gayathriamulya98 G Feb. 7, 2019, 12:57 p.m. OK GNU C++17 TESTS 19 217 307200 3200
49561815 Los_Angelos_Laycurse G Feb. 7, 2019, 12:56 p.m. OK GNU C++17 TESTS 19 217 307200 3200
60927364 HirasawaaYui G Sept. 20, 2019, 12:40 p.m. OK GNU C++17 TESTS 19 312 0 3200
46626286 Shayan.P G Dec. 4, 2018, 9:08 p.m. OK GNU C++17 TESTS 19 499 0 3200
57438593 mocania G July 21, 2019, 5:59 a.m. OK GNU C++17 TESTS 19 639 102400 3200
31151200 mmaxio G Oct. 8, 2017, 5:37 p.m. OK Java 8 TESTS 19 1465 0 3200
32772081 Eartharae G Nov. 29, 2017, 7:22 a.m. OK Java 8 TESTS 19 1481 20684800 3200
33015480 Jamspicaa G Dec. 8, 2017, 6:18 a.m. OK Java 8 TESTS 19 1497 20684800 3200
32867946 Angelus G Dec. 2, 2017, 2:44 p.m. OK Java 8 TESTS 19 1497 20684800 3200
32910336 Jamspicaa G Dec. 4, 2017, 12:10 a.m. OK Java 8 TESTS 19 1528 20684800 3200

remove filters

Back to search problems