摘要: 数论 2017年3月4日02:11:35 gcd 1. 原理: gcd( a, b ) = gcd( b, a b ) gcd( a, b ) = gcd( b, b % a ) 2. 代码 3. 时间复杂度: O(log n) 4. 预处理 d[3000][3000] 中所有两个数的gcd 预处理 阅读全文
posted @ 2017-03-06 20:13 ARZhu 阅读(309) 评论(1) 推荐(2)
摘要: 30分代码 cpp include include include include using namespace std; inline int read(){ int x = 0,tmp = 1;char ch = getchar(); while( ch '9' ) {if ( ch == ' 阅读全文
posted @ 2017-03-06 15:15 ARZhu 阅读(179) 评论(0) 推荐(0)