-
RG2051
用于接收红外摇控器和异步串行的8051单片机程序(for receiving infrared remote control and asynchronous serial 8051 of the procedures )
- 2006-11-02 16:50:25下载
- 积分:1
-
single-voltage
使用单片机制作多路输入电压表程序
用汇编语言写的。希望对大家有用(Using single-chip multi-channel input voltage meter program written in assembly language. I hope useful)
- 2013-09-13 20:14:21下载
- 积分:1
-
zifu
运用汇编语言实现字符串比配功能,输入主字符串然后再和子字符串比配看是否存在(Compared with the string)
- 2011-06-22 19:52:56下载
- 积分:1
-
q1
说明: Pokeface
题目描述
魔术师将一叠扑克顺次在桌上排成一行,初始全部正面朝上。随后,他每次挥一挥衣袖,都会翻转一连串的扑克,改变它们的正反朝向。从古代传下来的规矩,魔术师皆有师傅,他们要随时准备回答师傅的问题。问题形如:目前从第i张扑克牌到第j张扑克牌中,有几张正面朝上?
作为魔术师的助手,你被要求学习程序设计、算法与数据结构。现在,魔术师把这个问题交给了你,你需要编写一个程序,维护相应的数据结构来保存桌子上牌面的情况,同时对于师傅的每一个问题,你要用尽量快的速度计算出答案。
输入
第一行包含三个正整数n、p和q。n表示扑克牌的数量,p表示魔术师的挥一挥次数,q表示师傅的问话次数。
接下来共p+q行,每行包含一个操作,操作分为2种:
H i j 魔术师挥一挥,改变了第i张牌到第j张牌的正反
Q i j 师傅问话:截至目前,第i张到第j张牌中有多少张正面朝上
操作中恰好包含p次H操作,q次Q操作,与第一行的p和q吻合。H操作和Q操作的范围均包含边界(即第i张和第j张牌)。
对于每个操作,输入保证1 ≤ i ≤ j ≤ n。
输出
对于每次Q操作,输出一行,包含一个整数,表示问题的答案。
提示:线段树(Pokeface
Title Description
The magician will stack poker table sequentially in a row, all the initial face-up. He then every wisp will flip a series of poker pros and cons of changing their orientation. The rules handed down ancient times, the master magician Jie, they be ready to answer the teacher s questions. Question of the form: Currently playing cards i to j-card poker, there are a few face-up?
As a magician s assistant, you are required to learn programming, algorithms and data structures. Now, the magician put this question to you, you need to write a program to maintain appropriate data structure to hold the cards on the table face the situation, while the master for each question, and you want to use as quickly calculate the answer.
Enter
The first line contains three positive integers n, p and q. n represents the number of poker, p represents the wave of the magic number, q represents the number of master s questioning.
Next, a total of p+ q rows, each containi)
- 2015-01-18 15:02:14下载
- 积分:1
-
0804KONG
说明: adc0804制作的温度控制器, 设一个加热器p2.0一个制冷器p2.7
设定下限温度30度(设4bh)存31h上限温度60度(设96h)存30h
调整ad电位器可观察到p2.0,p1.4继电器端口的动作范围 (93C46 way to read and write 8-channel Marquee LED display* * 0x00 starting from the address to write data " 1-8" and then read out to send digital tube display.* * Hardware connections: digital control data access P0, the digital control access P2, 93C46 then P3.4- P3.7* * boot, digital tube display 0-7, mobile display, in order to prove the role of 93C46 to out 93C46 connection, it shows that 8* * Note: In the erase or write data, you must first write EWEN instruction for 8-bit mode)
- 2010-03-22 15:38:20下载
- 积分:1
-
EEPROM.txt
基于pic16f676 EEPROM的问题
用软件仿真没问题,但烧到片子里,不能正常运行。情况是这样的:假如循环向EEPROM中写数据,9,8,7,6,5,4,3,2,1,然后读,发现每一位读出的都一样,是写循环中第一个写进去的字节,也就是9。其他的并没有写进去。
EEPROM的写通过判断标志位就可以,但是在下一次写之前要清除上一次写完成的标志位。也就是说,每次写完要清除完成标志位,否则下一次写不进去。(Based on pic16f676 EEPROM problem
With the software simulation no problem, but burn to film, not normal operation. The fact of the matter is: if cycle to write the data of EEPROM, 9,8,7,6,5,4,3,2,1, then read, and found that each of the read, write the first cycle is written in bytes, also is 9. The other are not written in.
Write through the judgement of EEPROM sign a can, but in the next write to remove the last completed before writing the sign of a. That is, every time to remove the written finish marks a, or the next write in.
)
- 2012-03-20 16:27:58下载
- 积分:1
-
Frequency-Meter
基于90s2313的计算机并口频率计,有图纸和源代码(Parallel computers based 90s2313 frequency meter, there are drawings and source code)
- 2013-12-22 08:51:18下载
- 积分:1
-
switch
双电源转换开关自动转换程序,能实现断相检测过压,欠压检测(Dual power switch automatic conversion process, to achieve the Phase-cut overvoltage, undervoltage detection)
- 2013-04-30 15:56:41下载
- 积分:1
-
INT01
说明: P1口的8个灯循环亮,按P32后全部闪烁5次后继续循环亮, 中断程序的典型应用。 (P1 mouth of the eight bright light cycles, according to P32, all the flashes five times after the continued cycle of light, interrupt procedures typical application.)
- 2010-03-22 15:29:19下载
- 积分:1
-
lms_flp32
TigerSharc TS201 floating point lms filter routine(TigerSharc TS-201 floating point lms filte r routine)
- 2006-11-06 22:42:57下载
- 积分:1