码迷,mamicode.com
首页 >  
搜索关键字:算法训练 结点选择    ( 439个结果
算法训练——最大最小公倍数
//最大最小公倍数 // #include<stdio.h> int main(){ int n; scanf("%d",&n); //连续3个数 奇偶奇 互质 if(n<=2) printf("2"); else if(n==3) printf("6"); else if(n%2==1) prin ...
分类:编程语言   时间:2020-01-28 10:57:48    阅读次数:84
算法训练——最大值与最小值
//最大值与最小值 #include<stdio.h> #include<stdlib.h> #define MAXN 100 int comp(const void*a,const void*b)//用来做比较的函数。 { return *(int*)a - *(int*)b; } int mai ...
分类:编程语言   时间:2020-01-28 10:48:40    阅读次数:84
算法训练——最小乘积——基本型
//最小乘积(基本型) #include<stdio.h> #include<stdlib.h> #define MAXN 100 int comp_a2(const void*a,const void*b)//用来做比较的函数。 { return *(int*)a - *(int*)b; } in ...
分类:编程语言   时间:2020-01-28 09:25:28    阅读次数:120
算法训练 6-1 递归求二项式系数值
问题描述 样例输入 一个满足题目要求的输入范例。3 10 样例输出 与上面的样例输入对应的输出。 数据规模和约定 输入数据中每一个数的范围。 例:结果在int表示时不会溢出。 1 #include<iostream> 2 using namespace std; 3 #include <iostre ...
分类:编程语言   时间:2020-01-27 19:11:15    阅读次数:67
算法训练——比较字符串
//比较字符串 #include<stdio.h> #include<string.h> #define MAXN 100 int main(){ char str1[MAXN],str2[MAXN]; int length; scanf("%s%s",str1,str2); length = st ...
分类:编程语言   时间:2020-01-27 17:41:17    阅读次数:75
算法训练——摆动序列
//摆动序列 #include<stdio.h> int k,num; int data[22],book[22]; void dfs(int t){ if(t>1){ if(t==2) num++; else{ int flag = 1; for(int i=t-1;i>=2;i--){ //条件 ...
分类:编程语言   时间:2020-01-27 00:22:28    阅读次数:90
算法训练——阿尔法乘积
//阿尔法乘积 #include<stdio.h> int alpha(long long int x){ if(x<10) return x; else{ long n = 1; while(x){ if(x%10 != 0){ n *= x%10; x /= 10; } else x /= 10 ...
分类:编程语言   时间:2020-01-26 23:57:30    阅读次数:125
算法训练——暗恋
//算法训练——暗恋 //思路:枚举 #include<stdio.h> #define MAX 200 int map[MAX][MAX]; int judge(int x,int y,int cur){ //判断以(x,y)为左上角、长度为cur,能否构成一个纯色的正方形 int color; ...
分类:编程语言   时间:2020-01-26 22:11:44    阅读次数:67
GPU编程库
GPU计算能力这么强,被广泛使用!比如挖矿(比特币)、图形图像处理、数值模拟、机器学习算法训练等等,那我们怎么发挥GPU超强的计算能力呢? 编程! 怎么进行GPU编程呢?现在GPU形形色色,比如Nvidia、AMD、Intel都推出了自己的GPU,其中最为流行的就是Nvidia的GPU,其还推出了C ...
分类:其他好文   时间:2020-01-23 15:27:32    阅读次数:276
算法训练 景点游览
问题描述 小明来到一个景区游玩,但是他的时间有限,没办法逛遍所有的景点,所以他从网上下载了每个景点的评分,他希望能够使游览的景点的评分总和最高,于是他希望你帮他对于N个景点排下序。 输入格式 输入的第一行包含一个正整数N,表示N个景点。 第二行有N个正整数,表示每个景点的评分值。 输出格式 输出一行 ...
分类:编程语言   时间:2020-01-22 18:36:12    阅读次数:114
439条   上一页 1 ... 4 5 6 7 8 ... 44 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!