码迷,mamicode.com
首页 >  
搜索关键字:clu    ( 12562个结果
poj3262 Protecting the Flowers
思路: 简单贪心,每次选择性价比最高的。 实现: ...
分类:其他好文   时间:2017-03-19 11:43:05    阅读次数:128
对数组的遍历
#include<stdio.h> int main () { int a [10]; int*p,i; for(i=0;i<10;i++) scanf("%d",&a[i]); printf("\n"); for(p=a;p<(a+10);p++) printf("%5d",*p); printf ...
分类:编程语言   时间:2017-03-19 11:24:40    阅读次数:135
C语言 · 扶老奶奶过街
算法提高 扶老奶奶过街 时间限制:1.0s 内存限制:256.0MB 时间限制:1.0s 内存限制:256.0MB 一共有5个红领巾,编号分别为A、B、C、D、E,老奶奶被他们其中一个扶过了马路。 五个红领巾各自说话: A :我和E都没有扶老奶奶 B :老奶奶是被C和E其中一个扶过大街的 C :老奶 ...
分类:编程语言   时间:2017-03-19 11:13:52    阅读次数:253
hdu2067 小兔的棋盘 DP/数学/卡特兰数
棋盘的一角走到另一角并且不越过对角线,卡特兰数,数据量小,可以当做dp求路径数 1 #include<stdio.h> 2 long long a[36][36]; 3 int main() 4 { 5 int n,count=0; 6 while (scanf("%d",&n)!=EOF&&n!= ...
分类:其他好文   时间:2017-03-19 10:59:38    阅读次数:136
hdu2073-2078
hdu2073 数学 1 #include<stdio.h> 2 #include<math.h> 3 double len(double x){ 4 return sqrt(x*x+(x+1)*(x+1)); 5 } 6 7 int main(){ 8 int N; 9 while(scanf(" ...
分类:其他好文   时间:2017-03-19 10:55:12    阅读次数:256
ZOJ 3774 Fibonacci的K次方和
In mathematics, Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers of the following integer sequence: 1, 1, 2, 3, 5, 8, 13, 2 ...
分类:其他好文   时间:2017-03-19 02:41:52    阅读次数:900
第一次作业 使用指针完成对数组的遍历
#include <stdio.h>int main(){ int a[10]={1,2,3,4,5,6,7,8,9,10};//学号为6 故定义a[10] int *p;//定义指针 for(p=a;p<(a+10);p++)//定义一个for循环 减少步骤遍历数组a printf("%d\n", ...
分类:编程语言   时间:2017-03-19 00:01:38    阅读次数:216
poj1631 Bridging signals
思路: LIS,二分。 实现: ...
分类:其他好文   时间:2017-03-18 23:52:01    阅读次数:253
第二次作业
#include<stdio.h>int main(){int i,a[7]={1,2,3,4,5,6,7};//定义个整型i int*p=a;//定义指针p=a for(i=0;i<7;i++,p++)//用for循环数组 {printf("a[%d]=%d\n",i,*p);//输出 }retu ...
分类:其他好文   时间:2017-03-18 23:18:49    阅读次数:176
[ POJ ][ HASH ] 1635 Subway tree systems
首先,对于一个树,我们可以有一种压缩表示: 0010011101001011 其中 0 表示向下走,1 表示向上走。于是: 00100111|01|001011 对于每一段的 0 1 出现次数相同,这种hash方法叫 树的最小表示法 。 1635 题目精简大意:给你n对01字符串,判断每一对儿表示的 ...
分类:其他好文   时间:2017-03-18 23:10:55    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!