← 返回 google 的题目列表Action Sequence Streak
类型:online_judge
Given a sequence of actions, each with a timestamp, your task is to determine if there exists a streak of actions that appear continuously with intervals less than a given time T. The streak must contain multiple actions. You need to design a function to solve this problem and implement it in Python.
Example Input
Actions: ['jump', 'duck', 'jump', 'jump', 'jump'] Timestamps: [1, 3, 5, 6, 10] Given Time T: 3 Minimum required actions for streak: 3
Example Output
True
Constraints
Maximum number of actions: 1000
Example
Input
input_string