Question: Using C++, data structures, C++ STL, all test inputs and outputs are shown below. Description Victoria Harbour in Hong Kong has many busy ports and

Using C++, data structures, C++ STL, all test inputs and outputs are shown below.Using C++, data structures, C++ STL, all test inputs and outputs areshown below. Description Victoria Harbour in Hong Kong has many busy portsand piers for all kinds of usage. For example, Kai Tak Cruise

Description Victoria Harbour in Hong Kong has many busy ports and piers for all kinds of usage. For example, Kai Tak Cruise Terminal always welcomes large cruises with people from around the world. As a customs officer working in Kai Tak Cruise Terminal, Kyaru needs to record the information of all the cruises arrived and the passengers they carry. Specifically, for the i-th arrived cruise, she records t; as the time it arrived, ki as the number of passengers on board, and Xij(1 5 is k;) as the nationality of each passengers. One day, she was asked that for each of the cruises, she needs to count the number of different nationalities of all the passengers passing the customs within 24 hours(86400 seconds) before its arrival (include passengers on itself) (the time gap between one's cruise arriving at the terminal and him passing the customs is ignored). Since there're too many records on her hand, she turned to you for help. Formally, you need to check n records. For the i-th record, you should count the number of different numbers appeared among all Xp,j fulfilling ti - 86400

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!