当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2812:74LS00

题目描述
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.
输入解释
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.
输出解释
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&#160;order in Pin_ID.
输入样例
2
14 5.00000000
7 0.1
2
14 5.1
7 0.8
4
14 5.0000
7 0.7
1 0.3766
2 5.1344
6
14 5.00000000000
7 0
1 5.1
2 5.1
4 5.1
5 5.1
输出样例
Yes
No
Yes
3 H
Yes
3 L
6 L
来自杭电HDUOJ的附加信息
Author AekdyCoin
Recommend lcy

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2812

最后修改于 2020-10-25T22:57:06+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)