我們一個(gè)小組,課程大作業(yè)中做的簡(jiǎn)單的輸入法,有記憶功能。支持雙拼。開發(fā)環(huán)境visual stdio 2005
標(biāo)簽:
上傳時(shí)間: 2015-11-11
上傳用戶:gxmm
[輸入] 圖的頂點(diǎn)個(gè)數(shù)N,圖中頂點(diǎn)之間的關(guān)系及起點(diǎn)A和終點(diǎn)B [輸出] 若A到B無路徑,則輸出“There is no path” 否則輸出A到B路徑上個(gè)頂點(diǎn) [存儲(chǔ)結(jié)構(gòu)] 圖采用鄰接矩陣的方式存儲(chǔ)。 [算法的基本思想] 采用廣度優(yōu)先搜索的方法,從頂點(diǎn)A開始,依次訪問與A鄰接的頂點(diǎn)VA1,VA2,...,VAK, 訪問遍之后,若沒有訪問B,則繼續(xù)訪問與VA1鄰接的頂點(diǎn)VA11,VA12,...,VA1M,再訪問與VA2鄰接頂點(diǎn)...,如此下去,直至找到B,最先到達(dá)B點(diǎn)的路徑,一定是邊數(shù)最少的路徑。實(shí)現(xiàn)時(shí)采用隊(duì)列記錄被訪問過的頂點(diǎn)。每次訪問與隊(duì)頭頂點(diǎn)相鄰接的頂點(diǎn),然后將隊(duì)頭頂點(diǎn)從隊(duì)列中刪去。若隊(duì)空,則說明到不存在通路。在訪問頂點(diǎn)過程中,每次把當(dāng)前頂點(diǎn)的序號(hào)作為與其鄰接的未訪問的頂點(diǎn)的前驅(qū)頂點(diǎn)記錄下來,以便輸出時(shí)回溯。 #include<stdio.h> int number //隊(duì)列類型 typedef struct{ int q[20]
標(biāo)簽: 輸入
上傳時(shí)間: 2015-11-16
上傳用戶:ma1301115706
1.[問題描述] 編寫遞歸算法,計(jì)算二叉樹中葉子結(jié)點(diǎn)的數(shù)目 [輸入] 按照先序序列的順序輸入該結(jié)點(diǎn)的內(nèi)容。其輸入abd eh cf i g . [輸出] 按中序序列輸出,輸出的結(jié)果為;dbheaficg并計(jì)算出二叉樹中葉子結(jié)點(diǎn)的數(shù)目為4 [存儲(chǔ)結(jié)構(gòu)] 采用二叉表存儲(chǔ) [算法的基本思想] 采用遞歸方法建立和遍歷二叉樹。首先建立二叉樹的根結(jié)點(diǎn),然后建立其左右子樹,直到空子樹為止,中序遍歷二叉樹時(shí),先遍厲左子樹,后遍厲右子樹,最后訪問根結(jié)點(diǎn)。根據(jù)左右子樹的最后一個(gè)結(jié)點(diǎn)計(jì)算出二叉樹中葉子結(jié)點(diǎn)的數(shù)目。 程序如下: #include<stdio.h> #include<malloc.h> #include"stdlib.h"
上傳時(shí)間: 2015-11-16
上傳用戶:GavinNeko
2.[問題描述] 編寫遞歸算法,在二叉樹中求位于先序序列中第K個(gè)位置的結(jié)點(diǎn) [輸入] 按照先序序列的順序輸入該結(jié)點(diǎn)的內(nèi)容。其輸入abd eh cf i g 。輸入要求的位置 [輸出] 若二叉樹不空,按先序序列輸出,求出所求位置的結(jié)點(diǎn) [存儲(chǔ)結(jié)構(gòu)] 采用二叉表存儲(chǔ) [算法的基本思想] 采用遞歸方法建立和遍歷二叉樹。首先建立二叉樹的根結(jié)點(diǎn),然后建立其左右子樹,直到空子樹為止,先序遍歷二叉樹時(shí),先遍厲左子樹,后遍厲右子樹,最后訪問根結(jié)點(diǎn)并計(jì)算出二叉樹中葉子結(jié)點(diǎn)的數(shù)目和第K個(gè)位置的結(jié)點(diǎn) #include<stdio.h> #include<malloc.h> struct node{ char info struct node*llink,*rlink } typedef struct node NODE
上傳時(shí)間: 2014-01-13
上傳用戶:zm7516678
[問題描述] 在二叉排序樹中查找關(guān)鍵字為KEY的記錄 [輸入] 有序表輸入要查找元素的關(guān)鍵字 [輸出] 查找成功是即可顯示查找成功 #include <stdlib.h> #include <stdio.h> typedef int KeyType typedef struct{
標(biāo)簽: include stdlib KEY 輸入
上傳時(shí)間: 2015-11-16
上傳用戶:erkuizhang
學(xué)會(huì)對(duì)文件的記錄鎖定,及解鎖。#include <stdio.h> #include <unistd.h> #include <fcntl.h> int main() { int fd int i struct { char name[20] uint ID int age } myrec fd =open("name", O_RDWR|O_CREAT, 0755) if (fd == -1) return -1 printf("Input your name:") scanf("%s", myrec.name) printf("Inpute your ID :") scanf("%d", &myrec.ID) printf("Input your age :") scanf("%d", &myrec.age) lseek(fd, 0,SEEK_END) lockf(fd, 1, 0) write(fd, (void *)&myrec, sizeof(myrec)) lockf(fd, 0 ,0) return 0 } 執(zhí)行命令cc lock.c –o lock.out Chmod +x lock.out ./lock.out
標(biāo)簽: 記錄
上傳時(shí)間: 2016-01-04
上傳用戶:亞亞娟娟123
matlab中用C語(yǔ)言編寫sfunction, 實(shí)現(xiàn)讀取文件中的數(shù)據(jù),應(yīng)用庫(kù)"stdio.h"
標(biāo)簽: sfunction matlab C語(yǔ)言 編寫
上傳時(shí)間: 2014-01-21
上傳用戶:小碼農(nóng)lz
The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisidec] intended for decoding all current and future Vorbis I compliant streams. The Tremor libvorbisidec library exposes an API intended to be as similar as possible to the familiar vorbisfile library included with the open source Vorbis reference libraries distributed for free by Xiph.org. Tremor can be used along with any ANSI compliant stdio implementation for file/stream access, or use custom stream i/o routines provided by the embedded environment. Both uses are described in detail in this documentation.
標(biāo)簽: integer-only embeddable libvorbisi provides
上傳時(shí)間: 2013-12-25
上傳用戶:lindor
The Tremor Vorbis I stream and file decoder provides an embeddable, integer-only library [libvorbisidec] intended for decoding all current and future Vorbis I compliant streams. The Tremor libvorbisidec library exposes an API intended to be as similar as possible to the familiar vorbisfile library included with the open source Vorbis reference libraries distributed for free by Xiph.org. ogg vorbis decoder, evc project Tremor can be used along with any ANSI compliant stdio implementation for file/stream access, or use custom stream i/o routines provided by the embedded environment. Both uses are described in detail in this documentation.
標(biāo)簽: integer-only embeddable libvorbisi provides
上傳時(shí)間: 2016-01-21
上傳用戶:gengxiaochao
實(shí)驗(yàn)源碼是2410完全開發(fā)用的,通過此源碼實(shí)驗(yàn)初學(xué)者可以一步步步入arm開發(fā)的殿堂。 源碼包括:led點(diǎn)亮、key、stdio操作以及nand和sdram操作控制等。
標(biāo)簽: 2410 實(shí)驗(yàn) 源碼
上傳時(shí)間: 2016-02-14
上傳用戶:1051290259
蟲蟲下載站版權(quán)所有 京ICP備2021023401號(hào)-1