原创 hdu 1286 找新朋友 (歐拉函數)

Problem Description 新年快到了,“豬頭幫協會”準備搞一個聚會,已經知道現有會員N人,把會員從1到N編號,其中會長的號碼是N號,凡是和會長是老朋友的,那麼該會員的號碼肯定和N有大於1的公約數,否則都是新朋友,現在會長

原创 三值邏輯小解

雖然已經學了一年多了,但是看到《程序員的數學》第二章後感想又有很多,就寫個讀後 小感吧! 1.帶條件的邏輯與(&&) 邏輯與(&&)定義  :  (表格形式) 可以看出: 1).  A 爲 true 時 , B 的值就爲 A &&

原创 ACM hdu 1019 Least Common Multiple

Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer w

原创 數據結構筆記之—— 順序表實現

學習數據結構了,寫下來,加深記憶。 第一篇: //system("cls"); 控制檯屏幕刷新 #include<stdio.h> #include<string.h> #include<malloc.h> #define MAXSI

原创 Sdut 2165 Crack Mathmen(數論)(山東省ACM第二屆省賽E 題)

Crack Mathmen TimeLimit: 1000ms   Memory limit: 65536K  有疑問?點這裏^_^   題目描述  Since mathmen take security very seriously

原创 sdut 2603 Rescue The Princess(算是解析幾何吧)(山東省第四屆ACM省賽A題)

題目地址:sdut 2603 Rescue The Princess Time Limit: 1000ms   Memory limit: 65536K  有疑問?點這裏^_^ 題目描述     Several da

原创 hdu 1163 Eddy's digital Roots(九餘數定理)

hdu 1163 Eddy's digital Roots Problem Description The digital root of a positive integer is found by summing the dig

原创 2014年5月份學習計劃

ACM 組合數學: (時間 5月3號——8號) 排列組合 ——完成。母函數置換羣卡特蘭數熔池原理Burnside 定理Polya 計數數論剩餘部分:  (時間: 5月5號——10號)  隨機素數測試素因子快速分解整數因子快速分解算法(P

原创 ubtutu 更新14.04後設置不全解決辦法

週四把ubuntu從13.10更新到14.04,然後系統設置就出問題了,如下圖: 在網上找了一下,百度經驗給出瞭解決方案: sudo apt-get install ubuntu-desktop 這個會把amazon廣告也給重新安

原创 標準C++中string類的用法

轉自博客園:http://www.cnblogs.com/xFreedom/archive/2011/05/16/2048037.html 相信使用過MFC編程的朋友對CString這個類的印象應該非常深刻吧?的確,MFC中的CStri

原创 hdu 1063 Exponentiation (高精度小數乘法)

//大數繼續,額,要吐了。 Problem Description Problems involving the computation of exact values of very large magnitude and pre

原创 hdu 1047 Integer Inquiry(高精度數)

Problem Description Oneof the first users of BIT's new supercomputer was Chip Diller. He extended hisexploration of po

原创 霍納法則(Horner's rule)

卡在hdu 1402 的高精度乘法了,要用FFT(快速傅里葉變換),然後看到了這個霍納法則,順便就寫下來了。 霍納法則:求多項式值的一個快速算法。 簡單介紹: 假設有n+2個數 , a0,a1,a2,a3,……an 和x組成的一個多項式,

原创 hdu 1316 How many Fibs?(高精度斐波那契數)

//  大數繼續 Problem Description Recall the definition of the Fibonacci numbers:  f1 := 1  f2 := 2  fn := fn-1 + fn-2 (n

原创 hdu 1715 大菲波數(高精度數)

  Problem Description Fibonacci數列,定義如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 計算第n項Fibonacci數值。     Input 輸入第一行爲一個整數N,接下