TypingJob
SRM 123 · 2002-12-10 · by axchma
Problem Statement
Your task is, given an
Constraints
- pages has between 1 and 10 elements inclusive
- each element of pages is between 1 and 100 inclusive
{38}
Returns: 38
{15,10,5,7,8}
Returns: 15
The first secretary can type the 15-page paper. The second secretary can type the 10-page and 5-page papers. The third secretary can type the 7-page and 8-page papers.
{100,100,100,100,100,100,100,100,100,100}
Returns: 400
{1,2,3,4,5}
Returns: 5
{1,2,3,4,5,6,7}
Returns: 10
{1,1,2,3,5,8,13,21,34,55}
Returns: 55
Fibonnaci numbers
{4,76,41,49,57,85,41,29,3,11}
Returns: 133
Ten random test cases
Submissions are judged against all 49 archived test cases, of which 7 are shown here. Case numbers match the judge’s.
Language: C++17 · define a public class TypingJob with a public method int bestTime(vector<int> pages) · 49 test cases · 2 s / 256 MB per case