Statistics

Problem Statement for "TravellingByTrain"

Problem Statement

You want to travel by train from one station to another. Unfortunately there is no direct train, so you have to transfer a number of times. Transferring happens instantaneously. We'll number the stations as follows: 0 is the departure station, 1 ... N-1 are the transfer stations (in that order) and N is the destination station.

You know the timetable of the trains travelling from station i to station i+1. It is given as a String[] timeTable. The i-th element (indexed from 0) of timeTable describes the trains from station i to station i+1 and contains one or more parts of the form "hh:mm-HH:MM" separated by single spaces. Here "hh:mm" and "HH:MM" are times in 24 hour notation. "hh:mm" is valid 24 hour notation if both "hh" and "mm" contain exactly 2 digits and 00<=hh<24 and 00<=mm<60.

If there is a part "hh:mm-HH:MM" in the i-th element of timeTable, this means that every day a train leaves from station i at time "hh:mm" and arrives at station i+1 at time "HH:MM". If "HH:MM" is later than "hh:mm" the train arrives on the same day; if it is earlier it arrives on the next day. If the two times are equal, the train takes exactly 24 hours and arrives the next day. No train will take more than 24 hours.

On day 1 you are at station 0 at 09:00. What is the earliest time you can get to station N? Return the time in the following format "hh:mm, day d", with "hh:mm" the time in 24 hour notation and "d" the day, with no leading zeroes.

Definition

Class:
TravellingByTrain
Method:
earliestArrival
Parameters:
String[]
Returns:
String
Method signature:
String earliestArrival(String[] timeTable)
(be sure your method is public)

Constraints

  • timeTable contains between 1 and 50 elements, inclusive
  • Each element of timeTable has length between 1 and 50, inclusive, and is formatted as described in the statement.

Examples

  1. {"10:00-13:00 12:00-15:00","11:00-16:00 14:00-19:00"}

    Returns: "19:00, day 1"

    You're at station 0 at 09:00, at station 1 at 13:00 and finally at station 2 at 19:00.

  2. {"09:00-13:57","13:56-17:00"}

    Returns: "17:00, day 2"

    You just catch the train at station 0, but miss the train at station 1, so you have to wait until the next day to catch the next train.

  3. {"10:00-08:00"}

    Returns: "08:00, day 2"

    If the arrival time is earlier than the departure time, the train arrives at that time the next day.

  4. {"09:10-11:00 09:05-10:05","10:10-12:00 11:00-11:05","17:00-08:00","09:00-08:00"}

    Returns: "08:00, day 3"

  5. {"09:00-09:00"}

    Returns: "09:00, day 2"

  6. {"08:59-08:59"}

    Returns: "08:59, day 3"

  7. {"10:00-22:00 21:58-21:59","21:59-03:00"}

    Returns: "03:00, day 2"

  8. {"08:59-08:59","08:58-08:58","08:57-08:57","08:56-08:56","08:55-08:55","08:54-08:54","08:53-08:53","08:52-08:52","08:51-08:51","08:50-08:50","08:49-08:49","08:48-08:48","08:47-08:47","08:46-08:46","08:45-08:45","08:44-08:44","08:43-08:43","08:42-08:42","08:41-08:41","08:40-08:40","08:39-08:39","08:38-08:38","08:37-08:37","08:36-08:36","08:35-08:35","08:34-08:34","08:33-08:33","08:32-08:32","08:31-08:31","08:30-08:30","08:29-08:29","08:28-08:28","08:27-08:27","08:26-08:26","08:25-08:25","08:24-08:24","08:23-08:23","08:22-08:22","08:21-08:21","08:20-08:20","08:19-08:19","08:18-08:18","08:17-08:17","08:16-08:16","08:15-08:15","08:14-08:14","08:13-08:13","08:12-08:12","08:11-08:11","08:10-08:10"}

    Returns: "08:10, day 101"

  9. {"09:04-16:43 10:03-13:32 11:04-12:01 11:00-12:05"}

    Returns: "12:01, day 1"

  10. {"00:00-00:00"}

    Returns: "00:00, day 3"

  11. {"09:00-08:59"}

    Returns: "08:59, day 2"

  12. {"10:43-21:35 01:49-08:18 09:45-08:41","12:18-09:08 01:23-09:03","13:37-04:41","07:43-12:57","14:50-14:44","11:08-08:39 06:29-09:45 22:30-03:55","06:24-15:45","02:08-19:01 04:09-07:12 22:06-16:27 06:30-14:30","01:14-16:07 01:23-17:59","06:30-08:08 15:02-12:31 16:14-18:14","04:20-00:42 05:26-14:42 22:09-21:44"}

    Returns: "14:42, day 8"

  13. {"14:41-02:44","20:09-20:37 15:48-03:44 03:59-02:01 04:28-23:36","18:50-22:18 03:45-15:24","23:32-21:21 18:23-09:16 10:21-12:10 18:52-11:51","17:58-17:21 09:52-05:38 00:12-04:03","08:24-09:56 20:22-05:20 12:44-08:59 06:27-03:22","08:54-03:58 05:05-12:13","21:50-01:09 04:07-14:04"}

    Returns: "01:09, day 7"

  14. {"16:55-16:01 02:05-19:36 11:49-12:50 11:45-20:22"}

    Returns: "12:50, day 1"

  15. {"13:55-06:16 15:15-01:23 22:48-02:15","06:21-14:49 09:39-16:31"}

    Returns: "14:49, day 2"

  16. {"15:26-10:02 18:24-13:20 11:17-23:45 06:18-23:58","17:52-10:32 21:18-19:47 03:52-23:26","02:20-22:56 05:43-20:37 12:20-04:02","17:49-03:11 14:27-21:45 13:25-18:19 16:40-19:20"}

    Returns: "18:19, day 4"

  17. {"18:39-04:00 15:41-23:17 18:23-22:06","07:15-21:26 04:14-16:46","13:17-05:13 23:29-01:16 07:03-22:16 02:06-13:20","22:23-16:12","13:44-11:50 14:44-01:10","02:09-12:57","19:31-23:59","04:10-02:27 05:48-00:00","13:37-03:11","23:53-03:22 00:27-23:15 00:18-05:11 07:43-09:20","06:37-01:10 22:22-13:13 02:38-22:49 22:48-09:27","23:17-01:15 03:56-05:17 16:13-16:41","01:40-19:48 16:06-09:53 02:42-19:56 14:39-09:13","22:13-05:53","14:40-19:23"}

    Returns: "19:23, day 12"

  18. {"23:15-01:55","09:17-16:47","19:37-09:25 06:09-15:39 02:03-21:53","05:37-23:05 08:33-08:27 03:23-14:15","00:12-19:11 11:49-13:34 06:54-04:45"}

    Returns: "13:34, day 5"

  19. {"09:42-05:55 03:39-09:46 00:41-03:40 01:04-07:06","07:18-13:07 18:24-23:51 06:49-04:32","14:03-17:28 22:15-01:15 14:37-08:57","01:40-13:35","22:13-06:39 15:38-17:33 00:08-10:17 19:33-01:52","02:47-13:40 16:03-23:34 08:53-19:11 02:23-05:56","04:39-15:38 19:39-09:22 10:00-23:25"}

    Returns: "23:25, day 4"

  20. {"09:10-16:39 10:53-09:14 01:03-00:49 14:40-12:20","03:02-21:10 14:58-03:07 07:30-01:16 20:46-06:16"}

    Returns: "06:16, day 2"

  21. {"00:36-18:02 04:08-04:23 06:20-20:04 18:31-11:59","21:40-21:39 09:40-09:02 10:47-14:02","03:56-17:22 17:43-19:05 04:50-00:51","23:58-15:41 05:21-01:09 06:26-15:46","07:55-20:28","00:03-16:17 19:36-15:09 02:49-16:58 16:29-06:42","11:19-17:30 14:38-02:56 17:51-22:42","09:13-14:50 15:00-15:39","17:03-07:59 06:23-09:13 02:03-09:31","06:27-04:59 23:49-13:50","00:40-14:39 12:17-23:29 04:07-16:01 12:38-00:01","16:02-14:09 02:00-05:59 04:43-19:51","19:44-19:10 05:30-05:36 04:01-12:41","19:58-05:02","04:37-09:00 14:44-23:20 07:13-03:14 22:06-00:14","03:29-04:34 18:20-09:45 16:11-23:14 19:04-10:42","01:47-07:48","12:58-04:53 09:47-02:58","17:35-05:13 12:01-20:30","10:31-03:16 18:45-03:38 21:33-04:16","07:28-01:26 05:46-22:16","04:15-10:59","18:09-22:27","10:41-17:52 16:16-14:44 12:17-17:19","03:15-08:35","04:23-08:01 06:33-02:54 15:07-23:05 22:00-12:41","21:23-05:37 20:39-04:52 19:41-02:12","07:01-12:16 18:01-23:05","14:01-09:06 05:50-17:02","01:30-10:27 14:28-23:50 03:55-06:39 16:03-15:47","18:35-15:00 17:51-22:12 18:58-10:24","20:01-22:58 11:55-19:15 21:17-03:57 21:48-20:18","02:47-14:15","09:28-00:59","21:47-11:14"}

    Returns: "11:14, day 28"

  22. {"01:20-18:02 08:26-07:53","04:00-06:11","19:58-23:28","06:06-18:34 07:00-14:55","23:30-20:09 12:40-06:18","10:41-12:07 15:54-17:55","23:08-17:53 10:33-07:03","05:37-22:11 23:51-14:00 00:52-22:08","13:53-13:51 07:56-02:24 16:24-01:20 01:27-19:16","03:08-01:22 05:41-20:22","14:55-03:50 16:31-22:43 00:46-19:48 18:17-06:42","11:46-06:34 23:16-08:35 21:43-02:00 03:23-23:44","13:29-02:18 21:37-21:10 14:55-19:45","09:36-00:22 00:09-15:52 02:39-13:39","22:50-01:15 05:05-08:36 15:14-03:50 12:46-15:04","20:22-14:56 17:28-18:15","05:37-06:59 16:59-08:45 16:36-11:59","21:46-11:26","22:16-00:29","14:45-12:22","12:41-07:13 15:17-22:05 06:11-16:55","06:15-22:47 05:43-13:09 13:25-19:22 01:13-12:28","09:13-18:40 15:23-06:22 12:48-06:01","23:54-04:31","01:33-04:04 08:39-17:03 06:45-03:01","02:58-00:25 21:02-20:38"}

    Returns: "20:38, day 21"

  23. {"09:17-06:57","19:40-00:11 15:21-02:32 16:59-04:47","18:56-14:37 20:25-18:54 08:41-07:54 04:55-15:31","14:44-20:53","20:04-08:16 03:35-08:11 03:29-12:07 20:49-23:07","20:36-19:44 23:27-19:14 11:31-13:51 11:52-02:39","15:07-14:28 02:08-07:05 00:41-19:10 02:36-12:31","04:04-20:00","11:38-09:47 07:07-17:04 15:21-23:04 18:10-14:30","01:25-13:13","13:22-05:53","06:01-17:43 20:21-10:41","14:37-15:06 04:05-10:30 00:23-04:16","01:34-01:00 12:15-19:10","09:42-05:58","03:14-06:08 18:16-17:52 20:59-03:39","16:24-11:07 16:54-05:39 16:56-01:52 04:37-10:34","22:05-16:56 04:20-21:55 07:11-23:43 22:42-10:23","09:32-06:03 14:51-16:14 13:41-13:00","22:49-01:00 08:47-13:36","18:44-07:31 01:48-10:11","17:33-07:51 12:32-05:10","10:18-05:49 00:03-20:46","01:08-11:40","06:52-01:55 13:12-21:00 21:26-07:16","04:22-09:59 12:50-07:10","14:29-16:26 18:38-21:00","12:16-11:26 04:36-17:47 11:58-20:57 19:08-21:53","03:20-03:11 06:55-02:08","22:47-19:48 10:33-01:30","05:06-03:21 04:44-14:17 19:04-09:36","19:15-22:15 17:30-21:07 18:36-10:54 18:47-18:56","12:04-19:17 12:14-09:28","14:22-14:42 12:24-05:41","08:27-09:23","10:02-20:37","07:04-20:49 23:23-20:31 03:04-05:22 14:53-18:12","15:55-02:23 02:54-08:18 18:15-00:48 14:32-22:50","18:38-21:31 08:23-12:00 01:30-23:32","20:00-00:45 06:53-18:08","16:27-06:33","19:38-16:01","16:57-02:47 22:36-00:02 21:52-19:40 05:37-16:44"}

    Returns: "00:02, day 32"

  24. {"23:00-23:10 22:51-07:45 20:24-07:13 07:46-16:42"}

    Returns: "23:10, day 1"

  25. {"16:07-08:44 12:53-11:27","18:04-09:31","01:58-06:39 15:03-02:38 08:27-03:21 03:19-18:31","23:46-04:55 03:05-14:47 06:12-16:02 09:46-23:46","10:16-23:03 01:25-05:18 13:35-01:17","05:24-20:14","03:33-19:12","11:31-08:01 09:44-21:43","09:02-05:11","09:56-03:20 17:05-13:26 14:34-22:50 17:51-09:34","19:53-01:52 10:08-07:21 02:32-11:59","11:16-10:11 16:25-06:23","09:49-14:15 22:24-14:16 22:23-08:00 03:41-00:39","22:15-15:32 20:48-14:16 18:14-11:17 02:49-10:32","14:42-23:22 12:46-10:09 05:53-18:12 04:26-08:57","09:09-08:52 23:36-02:28 02:49-08:01 02:05-16:15","14:01-15:35 00:32-01:55 01:24-21:59","12:50-09:15 07:43-23:42 15:19-20:38","04:23-07:26 23:35-23:46 13:52-07:13","08:28-02:51 23:18-19:44 07:38-04:00 11:19-04:03","09:46-13:45 21:08-08:46 08:44-13:11 20:47-12:50","18:51-17:56","14:22-22:43","05:25-01:38 12:51-18:23 18:32-16:52","19:15-06:37 14:51-15:30 09:30-08:51 06:55-13:44","06:09-00:49","12:33-01:24 07:12-13:57","12:24-14:41","10:39-04:19","18:37-19:01","12:44-06:35 20:53-02:32 09:37-06:55","19:08-16:49 15:23-12:10 17:34-19:43 21:52-11:52","10:04-08:46 06:05-00:08","01:01-12:52","18:20-18:43"}

    Returns: "18:43, day 28"

  26. {"05:19-23:21"}

    Returns: "23:21, day 2"

  27. {"18:56-00:21","09:54-18:34 13:54-10:31 04:29-22:46","17:34-03:41","10:34-05:54 04:07-03:48","14:50-12:24","04:04-08:21 08:09-10:30 00:48-02:44 05:34-07:12","23:43-03:21","23:00-22:38 12:37-12:46 11:08-14:55 19:57-06:34","22:19-14:34 15:01-03:18 02:42-14:15 11:29-22:37","09:38-02:08 19:28-10:30 11:01-02:33","04:44-09:32 16:59-14:23 00:30-06:17","15:18-14:59 22:29-02:40","10:39-08:51 01:16-22:10 08:14-12:12 23:58-01:32","19:16-06:07 09:49-04:27 20:11-05:59","18:16-11:14","19:50-08:18 20:57-06:32 14:10-15:03","17:29-20:17 12:06-13:15","20:56-23:28","22:12-16:08 06:24-08:35 16:08-22:56","12:08-02:35 16:17-08:43","11:12-11:55","22:27-08:16 14:46-07:28 09:18-22:10 02:29-04:58","12:46-20:56 12:45-06:07 19:51-20:54","01:16-03:10","14:27-00:44 20:48-05:23","18:33-17:44 05:16-21:53 20:14-15:04 20:47-11:45","14:59-23:57 07:39-11:40 21:36-18:05 15:29-19:30","00:25-08:52","06:55-15:22 13:06-22:37","22:08-05:55 05:01-23:45","05:17-09:47","19:29-12:39 01:31-11:56","04:19-12:23 04:57-13:59","12:35-17:02 17:33-16:44","07:24-14:46 12:25-00:05 13:00-12:48 20:49-03:13","09:56-02:48 02:06-23:03 20:06-02:47 02:58-01:59","07:29-11:54 16:23-17:52","08:23-19:36 02:58-04:06 23:01-01:53"}

    Returns: "01:53, day 27"

  28. {"05:52-13:41","21:19-23:51 18:56-00:22 15:58-07:05","15:55-07:57 16:58-22:59 11:43-11:39 00:48-00:32","02:56-07:31 16:39-23:52","04:08-23:36 22:11-17:46","22:07-12:02 06:29-22:51","03:47-23:53 00:47-06:06 11:19-14:39","04:08-11:56","22:15-07:13 11:21-07:01","22:57-16:12 16:13-08:09 07:32-12:30 18:30-22:31","22:30-21:18 06:21-08:27 00:02-10:58","02:17-16:05 20:27-03:50","00:51-08:49 01:31-18:19 03:47-13:28 17:35-02:04","01:42-04:25","10:59-17:39 20:01-18:36","15:21-20:50 20:14-19:31","11:30-11:03 22:17-17:17 12:40-01:23 09:46-20:30","10:47-03:22 10:58-01:09 10:41-17:20","15:05-18:20 02:48-14:29","16:53-03:11","11:19-14:05 06:38-03:04 22:40-07:00","18:54-19:09"}

    Returns: "19:09, day 18"

  29. {"02:46-10:59","16:42-14:24 04:42-22:11 08:07-05:28 20:14-21:44","23:13-10:46 17:42-07:45","23:02-19:41","02:57-06:18 02:44-19:17 00:33-14:12","04:59-07:11 17:09-13:29 20:59-16:35","00:26-15:32","23:15-06:45 05:32-14:35 07:27-14:54","10:07-14:38","16:52-19:49 16:36-19:51 20:42-19:08 12:38-15:41","03:39-03:05 08:18-21:33 01:02-00:41 13:30-14:14","02:58-16:46 19:45-06:48 20:50-15:26","00:46-17:05 06:09-00:44 15:34-15:08 06:41-00:32","05:02-04:55 03:51-14:54","17:04-10:17 04:51-21:06","22:47-04:27 20:56-18:05 00:41-13:54","10:08-20:36 22:13-23:14 04:36-11:12","11:11-18:42","05:27-07:39","08:36-01:58","22:25-09:17 00:08-01:53 09:38-13:16","21:57-05:14","03:35-00:00 20:32-19:55 17:08-02:53 01:54-06:32","16:04-19:40","10:44-06:17 09:35-02:24 09:45-11:53 07:16-17:07","06:05-09:01 03:25-23:10","01:23-22:05 22:47-09:22 10:12-11:11 22:13-10:33","20:35-07:20 22:29-04:40 03:09-07:58 01:12-17:15"}

    Returns: "04:40, day 22"

  30. {"02:36-09:27 22:30-16:12","23:15-04:28 12:14-03:16","21:17-10:42 20:48-19:53 04:14-13:40 23:26-17:42","17:30-15:30 15:25-10:56 16:54-05:38 04:27-02:42","00:54-13:00 16:41-14:50 01:37-00:43 06:31-13:27","17:49-02:52 04:51-15:17 03:30-09:12 10:31-21:29","17:10-12:19","10:26-17:45","06:54-22:03","17:12-19:08 19:21-03:03 09:38-19:28","20:17-19:09 20:13-07:00","06:43-10:22 03:52-09:17","22:44-23:00","07:49-11:39 08:56-19:59 00:49-19:28","17:44-14:00 11:41-10:24 11:15-14:08 18:50-20:58","01:33-21:32 04:32-20:20 21:12-16:56","11:35-14:59 04:34-03:43","09:14-11:42 08:36-02:33 17:29-08:16","22:38-06:50 16:02-07:02 07:18-02:04","10:55-02:53 07:37-17:13","18:51-09:10 22:40-15:41 00:28-10:57 23:07-07:20","14:29-17:03 18:40-02:46 01:11-09:24 17:04-06:04","06:53-22:14 17:16-14:25","16:25-16:29 04:01-20:19 19:55-15:46","13:25-20:11 22:09-11:01"}

    Returns: "11:01, day 19"

  31. {"02:10-06:25 19:35-14:12 15:48-04:55 08:32-13:03","01:58-07:12 23:50-23:42 02:56-18:40 01:27-08:55","21:48-05:09 17:29-12:00 04:42-20:07","08:39-04:21","21:00-23:22 05:06-06:39","04:30-13:18 19:28-23:10","16:33-12:04","12:05-20:15 21:48-09:28"}

    Returns: "20:15, day 7"

  32. {"08:59-08:59", "08:58-08:58", "08:57-08:57", "08:56-08:56", "08:55-08:55", "08:54-08:54", "08:53-08:53", "08:52-08:52", "08:51-08:51", "08:50-08:50", "08:49-08:49", "08:48-08:48", "08:47-08:47", "08:46-08:46", "08:45-08:45", "08:44-08:44", "08:43-08:43", "08:42-08:42", "08:41-08:41", "08:40-08:40", "08:39-08:39", "08:38-08:38", "08:37-08:37", "08:36-08:36", "08:35-08:35", "08:34-08:34", "08:33-08:33", "08:32-08:32", "08:31-08:31", "08:30-08:30", "08:29-08:29", "08:28-08:28", "08:27-08:27", "08:26-08:26", "08:25-08:25", "08:24-08:24", "08:23-08:23", "08:22-08:22", "08:21-08:21", "08:20-08:20", "08:19-08:19", "08:18-08:18", "08:17-08:17", "08:16-08:16", "08:15-08:15", "08:14-08:14", "08:13-08:13", "08:12-08:12", "08:11-08:11", "08:10-00:00" }

    Returns: "00:00, day 101"

  33. {"10:00-10:00" }

    Returns: "10:00, day 2"

  34. {"09:00-09:00", "02:00-02:00", "01:00-00:59" }

    Returns: "00:59, day 6"

  35. {"09:00-09:00 09:00-10:00", "10:00-11:00 09:30-11:30", "11:00-11:00 11:00-11:03", "12:00-11:00 12:00-10:59", "10:59-10:59 10:59-10:58", "10:58-10:58 10:58-10:59", "10:59-10:59 11:00-11:00" }

    Returns: "10:59, day 4"

  36. {"09:00-13:57", "13:56-17:00" }

    Returns: "17:00, day 2"

  37. {"08:59-09:00", "09:00-08:59", "08:59-09:00" }

    Returns: "09:00, day 3"

  38. {"07:00-06:00" }

    Returns: "06:00, day 3"

  39. {"09:10-11:00 09:05-10:05", "10:10-12:00 11:00-11:05", "17:00-08:00", "09:00-08:00" }

    Returns: "08:00, day 3"

  40. {"04:00-05:00" }

    Returns: "05:00, day 2"

  41. {"09:01-09:01" }

    Returns: "09:01, day 2"

  42. {"12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "12:00-12:00", "13:00-13:00", "14:00-14:00", "15:00-15:00", "16:00-16:00", "17:00-17:00", "18:00-18:00", "19:00-19:00", "20:00-20:00", "21:00-21:00", "22:00-22:00", "09:10-11:00 09:05-10:05", "10:10-12:00 11:00-11:05", "17:00-08:00" }

    Returns: "08:00, day 29"

  43. {"08:10-07:20 07:30-06:50" }

    Returns: "06:50, day 3"

  44. {"08:00-09:00" }

    Returns: "09:00, day 2"

  45. {"09:00-09:00" }

    Returns: "09:00, day 2"

  46. {"08:59-08:59" }

    Returns: "08:59, day 3"

  47. {"09:00-09:00", "08:59-08:58" }

    Returns: "08:58, day 4"

  48. {"09:00-10:00 09:05-09:10", "09:30-09:45" }

    Returns: "09:45, day 1"

  49. {"10:00-08:59", "08:59-09:00" }

    Returns: "09:00, day 2"

  50. {"08:10-11:00 09:05-08:05", "10:10-12:00 11:00-11:05", "17:00-08:00", "09:00-08:00" }

    Returns: "08:00, day 4"

  51. {"10:00-13:00 12:00-15:00", "11:00-16:00 14:00-19:00" }

    Returns: "19:00, day 1"

  52. {"08:10-21:00 09:05-07:05", "10:10-12:00 11:00-11:05", "17:00-08:00", "09:00-08:00" }

    Returns: "08:00, day 4"

  53. {"10:00-15:00 11:00-12:00" }

    Returns: "12:00, day 1"

  54. {"08:59-09:50 09:00-09:55" }

    Returns: "09:55, day 1"

  55. {"09:00-00:00" }

    Returns: "00:00, day 2"

  56. {"09:00-09:00", "08:59-08:58", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00", "09:00-09:00" }

    Returns: "09:00, day 18"

  57. {"08:59-08:59", "08:58-08:58" }

    Returns: "08:58, day 5"

  58. {"09:00-11:11 11:09-11:10" }

    Returns: "11:10, day 1"

  59. {"08:15-09:00 10:00-10:00", "09:00-09:15 10:00-10:10" }

    Returns: "09:15, day 2"

  60. {"10:00-13:00 23:00-00:00" }

    Returns: "13:00, day 1"

  61. {"09:00-08:57 08:00-08:40" }

    Returns: "08:40, day 2"

  62. {"09:00-09:00", "09:00-09:00" }

    Returns: "09:00, day 3"

  63. {"08:00-07:00" }

    Returns: "07:00, day 3"


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: