Codeforces Problem 161E - Polycarpus the Safecracker
摘要:
先暴力打素数表,然后枚举5位数里(从高位到低位)有i位确定且为x的数有多少个。具体解某个数时暴力即可#include<stdio.h>
#include<math.h>
#include<vector>
#include<string.h>
using namespace std;
bool vis[100010];
vector<int>dp[5][100010];
int k,l;
int a[6][6];
int dfs(int now){ int i,j,x=0,sum=0; for(i=0;i<now;i++) x=x 阅读全文
posted @ 2012-03-23 23:23 c语言源码 阅读(168) 评论(0) 推荐(0) 编辑