LeeBlog

导航

2011年5月25日 #

HDU 1164 Eddy's research I

摘要: 题意:把一个数拆成素数,从小到大排列。如果把素数全部存起来大概快一半的样子#include<stdio.h>#include<string.h>#define Max 65540int n,prime[Max+5],num[Max],c = 0;void DFS( int x ){ if( x == 0 ) return ; for( int i = 0; i < c; ++i ) { if( x % num[i] == 0 ) { printf( x == n?"%d":"*%d",num[i] ); DFS( x / n 阅读全文

posted @ 2011-05-25 09:41 LeeBlog 阅读(293) 评论(0) 推荐(0) 编辑