原创 hdu 2133

Secret Number Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s):

原创 HDU 2007-11 Programming Contest_WarmUp

HDU 2131  Probability(水題) Probability Time Limit: 3000/1000 MS (Java/Othe

原创 hdu 2148score

#include <iostream> using namespace std; int main() { int a[1000]; int z, n, k, i, t, r; scanf("%d", &z); while (z-- !=

原创 一道簡單題

一、 倒序數是將一個阿拉伯數的各位上的數字以逆序的形式寫成的數。該阿拉伯數的第一位變成最後位,最後位變成第一位。例如數1245被寫成5421。注意產

原创 n皇后

#include<iostream> using namespace std; bool vis[3][30];//記憶數組判斷列,主對角線,副對角線是否被佔 int ans=0,n; void dfs(

原创 hdu1133

Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of

原创 hdu1210

洗牌問題: 定理1:當第一張牌(牌1)回到初始位置時,所有的牌都回到了初始位置。 證明:設有一次操作,某牌在操作前處於位置r(1<=r<=2*N),那麼,操作後,如果r原來是前一半的,顯然r'=r*2; 否則,r'=(r-n)*2-1,即

原创 卡特蘭數

英文  Catalan數 編輯本段原理   令h(1)=1,h(2)=1,catalan數滿足遞歸式:   h(n)= h(1)*h(n-1)+h(2)*h(n-2) + ... + h(n-1)h(1) (其中n>=3)   例如

原创 hdu1568

Fibonacci(hdu1568)——一道我不知道怎麼說的題 Admin2011年10月4日              名人名言:時間就象海綿裏的水一樣,只要你願擠,總還是有的——魯迅 http://acm.hdu.edu.cn/sho

原创 母函數知識

在數學中,某個序列的母函數是一種形式冪級數,其每一項的係數可以提供關於這個序列的信息。使用母函數解決問題的方法稱爲母函數方法。 母函數可分爲很多種,包括普通母函數、指數母函數、L級數、貝爾級數和狄利克雷級數。對每個序列都可以寫出以上每個類

原创 poj 2698 八皇后問題

#include<iostream> using namespace std;  bool vis[3][20];//記憶數組判斷列,主對角線,副對角線是否被佔  int ans=0,num=1;  i

原创 hdu 1418

採用歐拉定理f+v-e=2 #include<iostream> using namespace std; int main() {  unsigned int n,m;   while(scanf("%u%u",&n,&m))  

原创 hdu1250

#include<iostream> using namespace std; int main() { int a[5][2010]; int i,j; int temp; int n,len,k; w

原创 hdu1597 find the nth digit(規律)

find the nth digit Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(

原创 早點開學

寒假不給力啊!希望早點開學,呼呼,加油啊,努力刷題