- 博客(5)
- 收藏
- 关注
原创 数学基本知识
*1.combination 和permutation的区别?*combination组合,表示字母为C,是无序的;从n个不痛的元素中取出m个元素并成一组,叫做从n个不同元素中取出m个元素的一个组合.表示为 m Cn permutation排列,表示字母为A,是有序的;从n个不痛的元素中取出m个元素,按照一定的顺序排成一列,叫做从n个不同元素中取出m个元素的一个排列.表示为: m An2
2015-02-12 21:08:46
282
原创 [HdOJ]5170 GTY's math problem
幂比较大小取对数比较就好了log(ab)=b∗log(a),注意会有精度误差#include <stdio.h>#include <math.h>int main(void){ double a,b,c,d; while(scanf("%lf %lf %lf %lf",&a,&b,&c,&d)!=EOF) { if(b*log(a)-d*
2015-02-11 23:48:38
307
原创 [HdOJ]1800 Flying to the Mars
#include <stdio.h>#include <algorithm>using namespace std;int main(){ long int a[3010]; int n,i,count,max; while(scanf("%d",
2015-02-10 10:34:10
321
原创 [HdOJ]2031 进制转换
#include <stdio.h>#include <stdlib.h>#include <iostream>#include <string.h> int main(){ int n; int r; char s[1000]; while(scanf("%d %d",
2015-02-10 10:31:38
347
原创 背包dp
1. 01背包hdoj 2602 Bone Collector`#include <stdio.h>int main(void){ int t,n,v,c[1000],w[1000],f[1000],i,j; scanf("%d",
2015-02-10 10:21:27
352
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人