Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.image text in transcribedimage text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions