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 225032099 Sept. 30, 2017, 5:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1867 ) B Ordering Pizza PROGRAMMING binary search sortings ternary search 1900

B"It's another Start[c]up finals, and that means there is pizza to order for the onsite contestants. There are only 2 types of pizza (obviously not, but let's just pretend for the sake of the problem), and all pizzas contain exactly S slices. It is known that the i-th contestant will eat si slices of pizza, and gain ai happiness for each slice of type 1 pizza they eat, and bi happiness for each slice of type 2 pizza they eat. We can order any number of type 1 and type 2 pizzas, but we want to buy the minimum possible number of pizzas for all of the contestants to be able to eat their required number of slices. Given that restriction, what is the maximum possible total happiness that can be achieved? The first line of input will contain integers N and S (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89S xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), the number of contestants and the number of slices per pizza, respectively. N lines follow. The i-th such line contains integers si, ai, and bi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89si xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), the number of slices the i-th contestant will eat, the happiness they will gain from each type 1 slice they eat, and the happiness they will gain from each type 2 slice they eat, respectively. Print the maximum total happiness that can be achieved. In the first example, you only need to buy one pizza. If you buy a type 1 pizza, the total happiness will be 3 xc2 xb75 xe2 x80 x89+ xe2 x80 x894 xc2 xb76 xe2 x80 x89+ xe2 x80 x895 xc2 xb79 xe2 x80 x89= xe2 x80 x8984, and if you buy a type 2 pizza, the total happiness will be 3 xc2 xb77 xe2 x80 x89+ xe2 x80 x894 xc2 xb77 xe2 x80 x89+ xe2 x80 x895 xc2 xb75 xe2 x80 x89= xe2 x80 x8974. "...

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
30958013 gaelim B Oct. 3, 2017, 4:48 a.m. OK GNU C TESTS 83 78 3686400 1900
30957942 gaelim B Oct. 3, 2017, 4:44 a.m. OK GNU C TESTS 83 78 3686400 1900
31125962 ZarinRafa B Oct. 7, 2017, 6:55 p.m. OK GNU C TESTS 83 78 7168000 1900
30957864 gaelim B Oct. 3, 2017, 4:39 a.m. OK GNU C TESTS 83 93 7270400 1900
35592369 M_sy B Feb. 23, 2018, 9:21 a.m. OK GNU C++ TESTS 83 31 5734400 1900
31188431 HenryPigLi B Oct. 10, 2017, 11:47 a.m. OK GNU C++ TESTS 83 46 6041600 1900
37004447 redbag B April 5, 2018, 5:44 p.m. OK GNU C++ TESTS 83 61 6758400 1900
32067288 itskoi B Nov. 5, 2017, 3:45 a.m. OK GNU C++ TESTS 83 62 1536000 1900
32354583 vjudge2 B Nov. 16, 2017, 12:17 p.m. OK GNU C++ TESTS 83 62 1638400 1900
32354538 DS-K B Nov. 16, 2017, 12:16 p.m. OK GNU C++ TESTS 83 62 1638400 1900
32005209 itskoi B Nov. 3, 2017, 11:13 a.m. OK GNU C++ TESTS 83 62 1638400 1900
30941697 vjudge4 B Oct. 2, 2017, 12:02 p.m. OK GNU C++ TESTS 83 62 2048000 1900
32354490 vjudge4 B Nov. 16, 2017, 12:14 p.m. OK GNU C++ TESTS 83 62 3174400 1900
32354480 DS-K B Nov. 16, 2017, 12:14 p.m. OK GNU C++ TESTS 83 62 3174400 1900
31366263 Never_See B Oct. 15, 2017, 1:15 p.m. OK GNU C++11 TESTS 83 31 4300800 1900
31366230 Never_See B Oct. 15, 2017, 1:14 p.m. OK GNU C++11 TESTS 83 31 4300800 1900
31366051 Never_See B Oct. 15, 2017, 1:09 p.m. OK GNU C++11 TESTS 83 31 4300800 1900
31366241 Never_See B Oct. 15, 2017, 1:15 p.m. OK GNU C++11 TESTS 83 46 4300800 1900
31622798 Departure B Oct. 23, 2017, 8:30 a.m. OK GNU C++11 TESTS 83 61 2867200 1900
55542079 bhaag_milkha B June 13, 2019, 8:42 p.m. OK GNU C++11 TESTS 83 62 2150400 1900
30879913 yum B Sept. 30, 2017, 6:25 p.m. OK GNU C++11 TESTS 83 62 6553600 1900
32644174 Turing.Machine B Nov. 25, 2017, 10:35 a.m. OK GNU C++11 TESTS 83 62 8499200 1900
30902178 animalcoder B Oct. 1, 2017, 7:45 a.m. OK GNU C++11 TESTS 83 62 27750400 1900
56058374 vjudge5 B June 26, 2019, 3:03 a.m. OK GNU C++11 TESTS 83 77 3686400 1900
30931106 CodingKnight B Oct. 2, 2017, 1:23 a.m. OK GNU C++14 TESTS 83 31 1228800 1900
30922176 CodingKnight B Oct. 1, 2017, 8:50 p.m. OK GNU C++14 TESTS 83 31 1228800 1900
30875861 LiChenKoh B Sept. 30, 2017, 5:24 p.m. OK GNU C++14 TESTS 83 31 6144000 1900
40979629 ReaLNero1 B July 30, 2018, 5:10 p.m. OK GNU C++14 TESTS 83 46 6144000 1900
32002563 phoaiphuthinh B Nov. 3, 2017, 9:08 a.m. OK GNU C++14 TESTS 83 62 1638400 1900
31152968 lys1280023 B Oct. 8, 2017, 7:20 p.m. OK GNU C++14 TESTS 83 78 1228800 1900
30922066 CodingKnight B Oct. 1, 2017, 8:40 p.m. OK GNU C++14 TESTS 83 78 1228800 1900
30930419 xlk B Oct. 1, 2017, 11:26 p.m. OK GNU C++14 TESTS 83 78 1638400 1900
31120575 KarlFreecss B Oct. 7, 2017, 3:34 p.m. OK GNU C++14 TESTS 83 78 3174400 1900
30891898 Aviously B Sept. 30, 2017, 11:26 p.m. OK GNU C++14 TESTS 83 78 3379200 1900
54420167 ZhihuiLiu B May 20, 2019, 2:57 p.m. OK GNU C++17 TESTS 83 78 2764800 1900
66192289 vjudge2 B Dec. 2, 2019, 4:56 p.m. OK GNU C++17 TESTS 83 93 2457600 1900
46644936 noble_ B Dec. 5, 2018, 11:36 a.m. OK GNU C++17 TESTS 83 93 3993600 1900
57246518 gyuni B July 17, 2019, 7:41 p.m. OK GNU C++17 TESTS 83 108 1638400 1900
45348810 ragen B Nov. 6, 2018, 6:02 a.m. OK GNU C++17 TESTS 83 108 3481600 1900
58220420 Trying_Rating B Aug. 3, 2019, 12:22 p.m. OK GNU C++17 TESTS 83 109 1638400 1900
56064600 vjudge3 B June 26, 2019, 7:17 a.m. OK GNU C++17 TESTS 83 109 1638400 1900
56064576 vjudge1 B June 26, 2019, 7:17 a.m. OK GNU C++17 TESTS 83 109 1638400 1900
51223151 vjudge4 B March 12, 2019, 1:11 p.m. OK GNU C++17 TESTS 83 109 1638400 1900
49349054 Andreasyan B Feb. 2, 2019, 7:19 a.m. OK GNU C++17 TESTS 83 109 2662400 1900
30972397 tyuan73 B Oct. 3, 2017, 4:01 p.m. OK Java 8 TESTS 83 186 0 1900
69716715 chojh1222 B Jan. 29, 2020, 9:15 a.m. OK Java 8 TESTS 83 202 0 1900
30971602 tyuan73 B Oct. 3, 2017, 3:30 p.m. OK Java 8 TESTS 83 218 0 1900
30875780 xiaowuc1 B Sept. 30, 2017, 5:23 p.m. OK Java 8 TESTS 83 218 0 1900
66449851 yaoct B Dec. 7, 2019, 11:03 a.m. OK Java 8 TESTS 83 233 5120000 1900
31030108 nateriver B Oct. 5, 2017, 10:55 a.m. OK Java 8 TESTS 83 248 0 1900
51176653 dmitriy0712 B March 11, 2019, 4:50 p.m. OK Java 8 TESTS 83 249 0 1900
31418328 PrakharJain B Oct. 16, 2017, 4:26 p.m. OK Java 8 TESTS 83 514 62464000 1900
32753665 xNikki B Nov. 28, 2017, 2:43 p.m. OK Java 8 TESTS 83 717 22016000 1900
30877382 SaveVMK B Sept. 30, 2017, 5:43 p.m. OK Java 8 TESTS 83 857 0 1900
31461707 lionvs13 B Oct. 17, 2017, 8:52 p.m. OK MS C# TESTS 83 358 24166400 1900
66116294 vjudge3 B Dec. 1, 2019, 9:54 a.m. OK MS C++ TESTS 83 62 4198400 1900
66116154 vjudge5 B Dec. 1, 2019, 9:51 a.m. OK MS C++ TESTS 83 62 4198400 1900
30934150 iamexist B Oct. 2, 2017, 5:53 a.m. OK MS C++ TESTS 83 62 4300800 1900
57931145 vjudge1 B July 29, 2019, 8:46 a.m. OK MS C++ TESTS 83 77 1638400 1900
43670029 vjudge4 B Oct. 2, 2018, 3:48 a.m. OK MS C++ TESTS 83 77 5734400 1900
43726630 vjudge3 B Oct. 3, 2018, 12:28 p.m. OK MS C++ TESTS 83 93 3481600 1900
43790066 vjudge3 B Oct. 4, 2018, 1:31 p.m. OK MS C++ TESTS 83 124 3174400 1900
32533586 JKSamir B Nov. 21, 2017, 6:45 p.m. OK MS C++ TESTS 83 218 2355200 1900
44026772 vjudge5 B Oct. 9, 2018, 8:23 a.m. OK MS C++ TESTS 83 264 3481600 1900
43727876 vjudge3 B Oct. 3, 2018, 12:59 p.m. OK MS C++ TESTS 83 265 3481600 1900
30991946 johnnylu305 B Oct. 4, 2017, 12:42 p.m. OK Python 2 TESTS 83 467 11366400 1900
30991995 johnnylu305 B Oct. 4, 2017, 12:44 p.m. OK Python 2 TESTS 83 468 10854400 1900
30960760 johnnylu305 B Oct. 3, 2017, 7:23 a.m. OK Python 2 TESTS 83 561 16076800 1900
30988603 johnnylu305 B Oct. 4, 2017, 9:44 a.m. OK Python 2 TESTS 83 655 21299200 1900
30988707 johnnylu305 B Oct. 4, 2017, 9:50 a.m. OK Python 2 TESTS 83 685 21299200 1900
42132446 Mk_Python_v1 B Aug. 26, 2018, 7:22 p.m. OK Python 3 TESTS 83 639 11571200 1900
31464954 Timmi239 B Oct. 17, 2017, 11:01 p.m. OK Python 3 TESTS 83 701 23756800 1900
30996207 Savit_Gupta B Oct. 4, 2017, 3:38 p.m. OK Python 3 TESTS 83 826 21606400 1900

remove filters

Back to search problems