原创 棧的順序結構實現

/* 1 棧的順序結構實現 */ #include <stdio.h> #include <stdbool.h> typedef int TYPE; //定義棧元素類型 #define SI

原创 Uva1225

#include <iostream> #include <cstring> using namespace std; int main(void) { int a[10]={0}; int n,count=0; cin>>c

原创 棧的鏈式結構實現

/* 2 棧的鏈式結構實現 */ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> typedef int TYPE;//元素類型別名 //聲明順序棧結構

原创 線性表的鏈式結構實現

/* 6 線性表的鏈式結構實現 */ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> typedef int TYPE;//定義數據類型別名 //聲明結

原创 隊列的順序結構實現

/* 3 隊列的順序結構實現 */ #include <stdio.h> #include <stdbool.h> typedef int TYPE;//元素類型 #define SIZE 20//元素最大個數SIZE-1,有

原创 最大子數組之暴力枚舉法

/*************************************************************** 用暴力枚舉法求解最大子數組問題,時間複雜度爲O(n的平方) 輸入: 第一行爲數組元素個數,第二行爲數組中的

原创 ffmpeg源碼安裝(1):linux

0X00、下載ffmpeg源碼 我們可以在ffmpeg官網下載源碼,下載地址http://ffmpeg.org/download.html,目前最新版本是4.2.2。 0X01、生成makefile 把下載的源碼放到linux系統

原创 隊列的鏈式結構實現

/* 4 隊列的鏈式結構實現 */ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> typedef int TYPE;//元素類型 //聲明鏈隊列結點結

原创 樸素法實現矩陣乘法

/***************************************************************************************** 普通法實現矩陣乘法:時間複雜度爲O(n的3次方) 輸入:

原创 選擇排序算法的實現

/* 作者:秦時小 專業:計算機科學與技術 學校:咸陽師範學院 2013級 時間:2016.01.27 程序名稱:選擇排序算法的實現 程序功能: */ #include <stdio.h> #include <stdbool.h>

原创 線性表的順序結構實現

/* 5 線性表的順序結構實現 */ #include <stdio.h> #include <stdbool.h> typedef int TYPE;//聲明元素類型別名 #define SIZE 10//順序表的最大空間

原创 Uva10881

#include <algorithm> #include <cstdio> using namespace std; typedef struct ant { int position;//表示位置,距離左端的距離 char dir

原创 插入排序算法的實現

/* 作者:秦時小 專業:計算機科學與技術 學校:咸陽師範學院 2013級 時間:2016.01.27 程序名稱:插入排序 程序功能: */ #include <stdio.h> #include <stdbool.h> /*

原创 二分查找的實現

/* 二分查找的實現 */ #include <stdio.h> //查找算法的實現 int search(int *p,int low,int high,int elem) { if(low>high)//遞歸終止條

原创 Uva1585

#include <iostream> #include <string> using namespace std; int main(void) { int T=0; string s;//默認爲空 cin>>T; whil