会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Gssol
Le temps ne trompe pas
博客园
首页
新随笔
联系
管理
上一页
1
2
3
4
5
6
7
8
9
···
11
下一页
2016年3月30日
hdu 1075 What Are You Talking About
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1075 题目大意:给出一个“翻译-原文”的对应表,然后给出句子,要把句子中的原文都翻译出来 代码:
阅读全文
posted @ 2016-03-30 23:10 Gssol
阅读(106)
评论(0)
推荐(0)
2016年3月24日
阶乘位数
摘要: #include #include #include #include #include using namespace std; int main() { int t,n; cin>>t; while(t--) { double sum=1; cin>>n; for(int i=1;i<=n;i++) ...
阅读全文
posted @ 2016-03-24 17:35 Gssol
阅读(126)
评论(0)
推荐(0)
树根
摘要: #include #include int main() { char st[1005]; int r,len; while(scanf("%s",st)&&st[0]!='0'){ r=0; len=strlen(st); for(int i=0;i<len;i++) ...
阅读全文
posted @ 2016-03-24 17:33 Gssol
阅读(117)
评论(0)
推荐(0)
hdu 1028 母函数 一个数有几种相加方式
摘要: ///hdu 1028 母函数 一个数有几种相加方式 #include #include #include #include #define INF 1000000009 using namespace std; const int _max = 10001; int c1[_max], c2[_max]; int main() { int n,i,j,k; while(c...
阅读全文
posted @ 2016-03-24 17:32 Gssol
阅读(145)
评论(0)
推荐(0)
第m个全排列
摘要: #include #include int flag,n,m; int a[1002],sum,vis[1002]; void dfs(int k) { if(flag==1) return; if(k==n+1) { sum++; if(sum==m) { flag=1; ...
阅读全文
posted @ 2016-03-24 17:31 Gssol
阅读(257)
评论(0)
推荐(0)
大数处理
摘要: //#include #include #include #include using namespace std; int a[10000][1000]; #define MOD 100000000 int main() { int n; a[1][0]=1; a[2][0]=1; for(int i=3;i>n) { int i;...
阅读全文
posted @ 2016-03-24 17:30 Gssol
阅读(124)
评论(0)
推荐(0)
并查集
摘要: #include using namespace std; int pre[2000]; int find1(int x) { int r=x; while(pre[r]!=r) { r=pre[r]; } return r; } void join(int x,int y) { int fx=find1(x); i...
阅读全文
posted @ 2016-03-24 17:28 Gssol
阅读(131)
评论(0)
推荐(0)
KMP算法及KMP算法的应用(POJ2406)
摘要: KMP算法的应用
阅读全文
posted @ 2016-03-24 17:26 Gssol
阅读(271)
评论(0)
推荐(0)
2016年3月7日
算法---分治法
摘要: 1.分治法的思想: 将一个输入规模为n的问题分解为k个规模较小的子问题,这些子问题互相独立且与原问题相同,然后递归的求解这些子问题,最后用适当的方法将各子问题的解合并成原问题的解。 2.分治法的步骤: 分(divide) 二分为主 治(conquer) 递归调用,当规模足够小时直接处理 组(comb
阅读全文
posted @ 2016-03-07 20:21 Gssol
阅读(445)
评论(0)
推荐(0)
2015年12月3日
codeforces 604B More Cowbell
摘要: 题目链接:http://codeforces.com/contest/604/problem/B题意:n个数字,k个盒子,把n个数放入k个盒子中,每个盒子最多只能放两个数字,问盒子容量的最小值是多少(当时没有看清题意,每个盒子最多只能放入两个数字)n个数字的输入是从小到大题目分类:贪心代码:#inc...
阅读全文
posted @ 2015-12-03 22:03 Gssol
阅读(652)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
11
下一页
公告