求高手写代码,附件是数据集。
要求:FLAG= "Yes" , in the following cases:
(1) TYPE="Vomiting" ;
(2) TYPE="Retching", and its duration >= 5 minutes ;
(3) TYPE="Retching", and it is preceded or followed by a "Vomiting", and the time between "Retching" and "Vomiting" <= 1 minute ;
(4) TYPE="Retching", and it is preceded or followed by other "Retching" events, and Ending time of the last event - Beginning time of the first event >= 5 minutes, and the time between any two events <= 1 minute ;
我实在是写不出来了,看过别人写的代码,没看懂,怎么看怎么像是错的。由于是真实的数据,所有要求中的(1)(2)两条就把所有的FLAG都置成yes了,无法根据结果判断(3)(4)是否正确。
所以恳求各位高手有时间的话帮我看看。