- 博客(4)
- 收藏
- 关注
原创 DFS一直写不好啊啊啊
n个数字里必须有连续m个数的和为质数 例如(12,1)就必须由12个质数组成 n<=12,m<=4#include <cstdio> #include <cmath> #include <iostream> #include <cstring> #include <algorithm> #include <queue> using namespace std; int ans[30][30],r
2016-06-22 15:59:08 377
原创 文章标题
题意:给一个字符串s,并给定n个变量的长度 5 4 2 4 4 2 例如 s:1bad1=acbe 然后求满足此式子1bbaaaadddd1=aaaaccccbbee 的解有多少种(这些变量只能取0/1)#include <cstdio> #include <algorithm> #include <iostream> #include <cstring> #define DEBUG 1
2016-06-03 23:01:37 246
原创 八皇后
第cur行放置第i列的皇后 c[cur]=i;#include <bits/stdc++.h> using namespace std; typedef long long LL; int c[100],ans=0,n; void dfs(int cur) { if(cur==n+1) { ans++; return ; } for(
2016-06-02 20:33:48 210
原创 文章标题
问第几个非丑数的值…例如第一个是7,第二个是11。#include <cstdio> #include <queue> #include <algorithm> #include <iostream> using namespace std; typedef long long LL; typedef pair<LL,int> PR; int n; LL rep[1530]; void init()
2016-06-02 00:15:55 332
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人