← 返回 twosigma 的题目列表Temperature and Humidity Matching
类型:online_judge
Given two lists sorted by time, temperature and humidity. Temperature entries have the format (time, city, reading), and humidity entries have the format (time, city, reading). Match each temperature reading with the most recent humidity reading from the same city.
Example
Input
[[(1, 'NYC', 12), (5, 'SFO', 20)], [(0, 'SFO', 12), (6, 'NYC', 2)]]