摘要:
bfs,主要是用pre记录前驱,输出路径。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#include<iostream>#include<cstdio>#include<cstring>#include&l... 阅读全文
摘要:
Def: Phi(n) = # of factors a s.t. (a, n) = 1Thm: Let p1, p2... pk be all prime factors of n,then,Phi(n) = n(1 - 1/p1)(1 - 1/p2)... (1 - 1/pk).Proof 1:It suffices to show that1) Phi(p) = p2) Phi(p^k) =... 阅读全文