原创 九度&1195:最長&最短文本
http://ac.jobdu.com/problem.php?pid=1195 #include <stdio.h> #include <iostream> #include <string.h> #include <string>
原创 題目1165:字符串匹配
http://ac.jobdu.com/problem.php?pid=1165 2008年北京航空航天大學計算機研究生機試真題 #include <iostream> #include <string> #include <stdio.
原创 題目94:不容易系列之一
http://ac.jobdu.com/problem.php?cid=1040&pid=93 錯排公式:f(n) = (n-1) * f(n-1) + (n-1) * f(n-2) #include <stdio.h> long
原创 九度題目1175:打牌
http://ac.jobdu.com/problem.php?pid=1175 2010年北京郵電大學網院研究生機試真題 #include <stdio.h> #include <string.h> char a[105],b[105
原创 九度題目1182:統計單詞
http://ac.jobdu.com/problem.php?pid=1182 2002年華中科技大學計算機研究生機試真題 將輸入一行字符串轉爲單個輸入單詞,每次輸出個數,若最後一個字符是.則結束本行輸入 熟悉雙重while循環的輸入方
原创 九度題目1097:取中值
http://ac.jobdu.com/problem.php?pid=1097 1、不用真的拿出來,合併,再找中間下標的值 2、注意下標計算,相對起始座標。而並不一定是相對1開始的 #include <stdio.h> int a[1
原创 zju2011 Median
http://ac.jobdu.com/problem.php?pid=1004#include <stdio.h> int a[1100005],b[1100005]; int main() { int n,m,i,j,num,m
原创 九度題目36:二叉搜索樹(判斷是否是相同二叉搜索樹)
http://ac.jobdu.com/problem.php?cid=1040&pid=35 2010浙江大學計算機機試試題 1、兩個二叉樹相同:插入建樹,先序遍歷+中序遍歷=一個字符串
原创 九度題目1184:二叉樹遍歷
http://ac.jobdu.com/problem.php?pid=1184 2002年華中科技大學計算機研究生機試真題 ABC##DE#G##F### 先序建樹:a ,左孩子b。 b,左孩子c,
原创 題目1199:找位置
http://ac.jobdu.com/problem.php?pid=1199 2005年華中科技大學計算機保研機試真題 1、注意一些細節,逗號的處理;換行的處理;第一次檢測到與之後檢測到相同字符的不同處理 2、 #include <s
原创 題目1203:IP地址
http://ac.jobdu.com/problem.php?pid=1203 2006年華中科技大學計算機保研機試真題 全部判斷完畢再輸出 #include <stdio.h> #include <string.h> int mai
原创 九度&題目1180:對稱矩陣
http://ac.jobdu.com/problem.php?pid=1180 2000年華中科技大學計算機研究生機試真題 #include <stdio.h> #include <iostream> #include <string.
原创 hdu1575:Tr A_矩陣的冪&二分求冪
http://acm.hdu.edu.cn/showproblem.php?pid=1575 二維矩陣做參數,寫在結構體裏,優化; #include <stdio.h> #include <string.h> struct Matri
原创 九度題目1179:階乘
http://ac.jobdu.com/problem.php?pid=1179 2000年華中科技大學計算機研究生機試真題 不涉及大數,所以簡單階乘就好,結果保存在long long 型數據 #include <stdio.h> #i
原创 題目1167:數組排序
http://ac.jobdu.com/problem.php?pid=1167 2009年北京航空航天大學計算機研究生機試真題 #include <stdio.h> #include <algorithm> #include <stri