2013年5月24日

UVa11300 - Spreading the Wealth (分金币)

摘要: F. Spreading the WealthProblemA Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has converted all of their properties to coins of equal value, such that the total number of coins is divisible by the numbe 阅读全文

posted @ 2013-05-24 21:03 nigel_jw 阅读(145) 评论(0) 推荐(0) 编辑

UVa11729 Commando War(突击战)

摘要: GCommando WarInput:Standard InputOutput:Standard Output“Waiting for orders we held in the wood, word from the front never cameBy evening the sound of the gunfire was miles awayAh softly we moved through the shadows, slip away through the treesCrossing their lines in the mists in the fields on our ha 阅读全文

posted @ 2013-05-24 20:41 nigel_jw 阅读(246) 评论(0) 推荐(0) 编辑

UVa 11292 Dragon of Loowater

摘要: Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to the lack of predators, the geese population was out of control. The people of Loowater mostly kept clear 阅读全文

posted @ 2013-05-24 16:41 nigel_jw 阅读(136) 评论(0) 推荐(0) 编辑

2013年5月23日

2013第四届 蓝桥杯c/c++B组预赛 解题报告(还在更新中。。。。。)

摘要: 大半部分题目都是自己做的,可能还有存在错误的地方,还望各位指正。有不会的题目,还请大牛们留下解题思路,谢谢了。第一题:高斯日记大数学家高斯有个好习惯:无论如何都要记日记。他的日记有个与众不同的地方,他从不注明年月日,而是用一个整数代替,比如:4210。后来人们知道,那个整数就是日期,它表示那一天是高斯出生后的第几天。这或许也是个好习惯,它时时刻刻提醒着主人:日子又过去一天,还有多少时光可以用于浪费呢?高斯出生于:1777年4月30日。在高斯发现的一个重要定理的日记上标注着:5343,因此可算出那天是:1791年12月15日。高斯获得博士学位的那天日记上标着:8113请你算出高斯获得博士学位的年 阅读全文

posted @ 2013-05-23 17:56 nigel_jw 阅读(944) 评论(0) 推荐(0) 编辑

用74HC163设计余3码计数器(结构描述)

摘要: 题目:用VHDL层次结构设计方法设计程序并仿真(时序),底层器件是74HC163。 1 library ieee; --第一个底层设计实体 nand_gate 2 use ieee.std_logic_1164.all; 3 entity nand_gate is 4 port( op1 , op2 : in std_logic; --nand_gate的两个数据输入端 5 nand_result : out std_logic); --nand_gate的数据输出端口 6 end nand_gate; 7 architecture behave... 阅读全文

posted @ 2013-05-23 16:39 nigel_jw 阅读(873) 评论(0) 推荐(0) 编辑

2013年5月12日

半加器设计(结构描述法)

摘要: 实验内容: 要求用VHDL结构描述的方法设计一个半加器。View Code 1 library ieee; --第一个低层设计实体 xor_gate 2 use ieee.std_logic_1164.all; 3 entity xor_gate is 4 port(op1 , op2 : in std_logic; 5 xor_result: out std_logic); 6 end xor_gate; 7 architecture behave of xor_gate is 8 begin 9 xor_res... 阅读全文

posted @ 2013-05-12 14:50 nigel_jw 阅读(1157) 评论(0) 推荐(0) 编辑

2013年5月7日

自动售饮机设计 (状态机)

摘要: 实验内容:1.设计一个自动售饮料机的控制逻辑电路。该机器有一个投币口,每次只能投入1枚1元或5角的硬币。当投入了1元5角的硬币,机器自动给出1杯饮料。当投入了2元的硬币,机器在自动给出1杯饮料时,还找回1枚5角的硬币。确定输入/输出变量、电路的状态并化简,做出状态转换图、状态转换表。2.在完成以上逻辑设计后,用VHDL编程并仿真。自动售饮料机的控制逻辑电路设计取投币信号为输入逻辑变量:令A=1表示投入1枚一元硬币。B=1表示投入1枚五角硬币。逻辑抽象 输出变量:Y=1表示给出一杯饮料。Z=1表示找回一枚五角的硬币。输出: 所有的输出情况为YZ=00、YZ=10、YZ=11。系统框图:输出饮料输 阅读全文

posted @ 2013-05-07 23:00 nigel_jw 阅读(1605) 评论(0) 推荐(1) 编辑

2013年5月6日

poj 2924

摘要: DescriptionJohann Carl Friedrich Gauß (1777 – 1855) was one of the most important German mathematicians. For those of you who remember the Deutsche Mark, a picture of him was printed on the 10 – DM bill. In elementary school, his teacher J. G. Büttner tried to occupy the pupils by making t 阅读全文

posted @ 2013-05-06 22:37 nigel_jw 阅读(156) 评论(0) 推荐(0) 编辑

poj 2027

摘要: DescriptionZombies love to eat brains. Yum.InputThe first line contains a single integer n indicating the number of data sets. The following n lines each represent a data set. Each data set will be formatted according to the following description: A single data set consists of a line "X Y" 阅读全文

posted @ 2013-05-06 22:36 nigel_jw 阅读(194) 评论(0) 推荐(0) 编辑

poj 1004

摘要: DescriptionLarry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what's been going on with 阅读全文

posted @ 2013-05-06 22:34 nigel_jw 阅读(117) 评论(0) 推荐(0) 编辑

导航