2834. The heart flu

单点时限: 5.0 sec

内存限制: 256 MB

It has been discovered that a new disease is attacking human beings. This new disease consists in a virus that attacks the heart, causing malfunction of it, leading to a permanent brain damage –in the best case scenario- or death. Since a collective paranoia has been raised, all hospitals have exceeded their capacity to check every patient that comes into the ER.

One of the new guidelines proposed by the hospital director was to create a triage, based on a computer program because there are no doctors enough to review all ECGs. The proposal is to admit a patient into the ER, take him/her to the ECG room were the patient lecture will be taken. The computer will take some specific points of the ECG and determine if the patient should be reviewed carefully by a doctor or if the patient is healthy and a psychiatrist needs to talk to him and explain the effects of the paranoia in his/her feelings.

You have been assigned to create the program that will take the lecture points in the ECG.

The important complex in an ECG is called QRS complex.

  • Q is the first wave in the complex with negative value
  • R is the second wave in the complex with positive value, and in a classic ECG, is the biggest wave
  • S is the last wave in the complex with negative value that comes after R wave.

In a normal ECG, the QRS complex has duration between 60 and 100 milliseconds, and a voltage no greater than 35 mV, and has no valleys.

输入格式

The input consists in the name of the patient, followed by an *, age an * and the points of lecture in the ECG separated by commas. Each point of data is 10 ms apart from each other. The point is given in mV.

输出格式

Each patient data will be separated by a — line.

The name of the patient

Age

Triage [PASS | NO PASS]

样例

Input
Gambino, Christine*35*0,0.1,-0.35,1.3,-0.55,0,.05,0
Martim, Gustavo*29*0,0.1,-0.5,1.5,-1,0,0.075,0
Guzman, Isabel*15*0,0,-0.05,-0.1,0.1,0.25,0.5,0.7,0.4,0.2,-0.01,-0.25,-0.5,-0.25
Output
Gambino, Christine
35
Triage PASS
Input
Martim, Gustavo
29
Triage PASS
Output
Guzman, Isabel
15
Triage NO PASS

6 人解决,10 人已尝试。

8 份提交通过,共有 19 份提交。

7.1 EMB 奖励。

创建: 14 年,1 月前.

修改: 7 年,2 月前.

最后提交: 3 年,12 月前.

来源: Mexico 2010

题目标签