原创 詞法分析ver1.0
int main(){int a/*hehe*/=100;//heheint b=100;int c;/*xixi*/c = a+b;char[] str1 = "miao";char[] str2 = "miao";printf("%d
原创 數學三角形問題
#include <iostream> #include <fstream> #include <string> #include <vector> #include <stdio.h> #include <stdlib.h> usin
原创 石子合併問題
#include <iostream> using namespace std; int main(){ int n = 4; int arr[] = { 4, 4, 5, 9 }; int **sums = new int*[n]
原创 帶方向性全排列
#include <iostream> using namespace std; typedef struct{ int value; int fangxiang;//-1<- 1-> }number; void swap(nu
原创 租用遊艇問題
#include <iostream> #include <fstream> using namespace std; int main(){ //數據讀取 ifstream in("input.txt", ios::in); if
原创 最小m段和
#include <iostream> using namespace std; int main(){ int n = 9; int m = 3; int arr[] = { 9, 8, 7, 6, 5, 4, 3, 2, 1 }
原创 編輯距離問題
#include <iostream> using namespace std; int main(){ char A[] = "fxpimu"; char B[] = "xwrs"; int lena = strlen(A);
原创 獨立任務最優調度
#include <iostream> using namespace std; int main(){ int n = 6;//15 int a[] = {2,5,7,10,5,2}; int b[] = {3,8,4,11,
原创 乘法表問題
#include <iostream> using namespace std; int main(){ int n; char str[] = "bbbba"; n = strlen(str); int ***m = new
原创 NodeJS+html5+css3 帶人機對戰和人人對戰的 五子棋
先說先五子棋的思想就是練成5個就勝出 用了博弈樹但是由於是JS語言的關係程序才2層而已,心思都放在了估值函數上。 各個情況的權有些是參照網上的不過自己改了下而且感覺自己寫的估值函數不錯發上來跟大家分享下,本人是小白程序還寫的不太好,js只
原创 算法訓練 操作格子
問題描述 有n個格子,從左到右放成一排,編號爲1-n。 共有m次操作,有3種操作類型: 1.修改一個格子的權值, 2.求連續一段格子權值和, 3.求連續一段格子的最大值。 對於每個2、3操作輸出你所求出的結果。 輸入格
原创 算法訓練 最大體積
問題描述 每個物品有一定的體積(廢話),不同的物品組合,裝入揹包會戰用一定的總體積。假如每個物品有無限件可用,那麼有些體積是永遠也裝不出來的。爲了儘量裝滿揹包,附中的OIER想要研究一下物品不能裝出的
原创 基於opencv的理想低通濾波器和巴特沃斯低通濾波器
首先看個圖瞭解下什麼是理想低通濾波器公式和圖是轉自Rolin的專欄 低通濾波器 1.理想的低通濾波器 其中,D0表示通帶的半徑。D(u,v)的計算方式也就是兩點間的距離,很簡單就能得
原创 LL(1)語法分析
#include <iostream> #include <iomanip> #include <string> #include <stack> using namespace std; int sea
原创 算法訓練 結點選擇
<span style="font-family: 微軟雅黑, 黑體, 宋體; background-color: rgb(255, 255, 255);">問題描述</span><span style="text-indent: 2e