|
||||||||||
74LS00Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 889 Accepted Submission(s): 394 Problem Description It¡¯s known to us that 74LS00 is a useful digital logic chip for use in a variety of projects. Give you the voltage in all the pins. Your task is quite simple, just estimate whether the chip could work normally or not. Here are some essential hints about the pins: Note: If you chose Pins (1, 2) for input, only Pins (3) would indicate logic. Here follow the definition of ¡°logic¡± If voltage Vi, |Vi-5|<=0.5 then we call it a ¡°High Logic¡± If voltage Vi is no larger than 0.8V, and Vi>=0 then we call it a ¡°Low Logic¡± ¡°H¡±: High Logical ¡°L¡±: Low Logical That is to say, if the voltage in Pin 1 is 5.0V and the voltage in Pin 2 is 5.0V, so the Pin 3 indicates Low Logic. The voltage in Pin 14 must be exactly 5.0V so that the chip could work normally; the voltage in Pin 7 must be always Low Logic. Input The input consists of several test cases. In the first line there is an integer n (2<=n<=10), indicating the number of descriptions. The next n lines contain the descriptions of the different Pins All the descriptions are given in the following format Pin_ID Voltage We guarantee that the Voltage is always in the range. (0<=Voltage<=0.8 or 4.5<=Voltage<=5.5) We guarantee that Pin 14 and Pin 7 will always be given in every case. Output For each test case, if the chip could work normally, just output ¡°Yes¡±, else output ¡±No¡± (without the quotations) If the chip could work normally, please output the logic in the ¡°Output Pins¡± if there exist some. The format for output the ¡°Output Pins¡± is: Pin_ID Logic Here Logic is either ¡®H¡¯ or ¡®L¡¯ as it described above. Hint: You should output the ¡°Output Pins¡± in ascending order in Pin_ID. Sample Input
Sample Output
Author AekdyCoin Source | ||||||||||
|