码迷,mamicode.com
首页 >  
搜索关键字:int-max    ( 1549个结果
[CTSC2008]网络管理(整体二分+树剖+树状数组)
一道经典的带修改树链第 $k$ 大的问题。 我只想出三个 $\log$ 的解法。。。 整体二分+树剖+树状数组。 那不是暴力随便踩的吗??? 不过跑得挺快的。 $Code\ Below:$ cpp // luogu judger enable o2 include define lowbit(x) ...
分类:编程语言   时间:2019-02-03 19:43:37    阅读次数:156
【集合工具类:Collections】
集合工具类:Collections (1) 是针对集合进行操作的工具类 (2) 面试题:Collection 和 Collections 的区别 A:Collection 是单列集合的顶层接口,有两个子接口 List 和 Set B:Collections 是针对集合进行操作的工具类,可以对集合进行 ...
分类:其他好文   时间:2019-01-31 12:54:10    阅读次数:166
c语言数组那些骚事儿
找出最大和第二大值#include #include #include int main() { int mynum[] = {43, 88, 56, 24, 78, 12, 8,29,57,80}; int max=0; printf("%d\n", max); int smax=0; print... ...
分类:编程语言   时间:2019-01-30 17:12:09    阅读次数:186
【POJ1958】汉诺塔+
题目大意:给定一个四个柱子的汉诺塔,N 个盘子,求最少多少步移动到另一个柱子上。 题解:$f[n]=min(2 f[i]+d[n i])$,其中 $d[i]$ 为汉诺三塔最小移动次数。M 塔同理。 代码如下 cpp include using namespace std; const int max ...
分类:其他好文   时间:2019-01-21 20:08:02    阅读次数:159
MySQL DDL 操作实践
根据网上的DDL树状图,自己copy了一份:http://assets.processon.com/chart_image/5c331a29e4b0fa03ce8eb139.png?_=1547952296662对不同版本的addindex的处理方式,这篇文章写得不错:https://www.jb51.net/article/75217.htm~~~~相关实践表结构:CREATETABLE`tt`
分类:数据库   时间:2019-01-21 11:21:15    阅读次数:241
1.17 嵌入式帅国豪
/* c函数练习 定义以下函数: 1. 求得两个整型数中较大的那一个 2. 返回给定正整数的倒序数。如给定的是1234,返回4321 3. 用递归求得一个整型数的阶乘 4. 判断一个整数是否在某两个整数之间 *//*1. 求得两个整型数中较大的那一个#include<stdio.h>int max( ...
分类:其他好文   时间:2019-01-18 00:58:15    阅读次数:180
指针的高阶用法——指针数组
在我们讲解指针数组的概念之前,先让我们来看一个实例,它用到了一个由 3 个整数组成的数组: include const int MAX = 3; int main () { int var[] = {10, 100, 200}; int i; for (i = 0; i const int MAX ...
分类:编程语言   时间:2019-01-13 21:07:41    阅读次数:169
返回一个二维整数数组中最大子数组的和
#include<stdio.h> #include<time.h> #include<stdlib.h> int main () { int a [5] [5]; int b,i,c,d; int m=0; int sum[100]; int max=0; for( i=0;i<5;i++) { ...
分类:编程语言   时间:2019-01-10 23:01:05    阅读次数:264
返回一个整数数组中最大子数组的和2
学习得到的代码 #include<iostream> 5 #include<stdlib.h> 6 #include <time.h> 7 using namespace std; 8 struct ret 9 { 10 int max, start, end; //用于存放最大值,及始末位置 11 ...
分类:编程语言   时间:2019-01-10 19:31:02    阅读次数:152
分支程序设计练习(初学者)
例:输入三个整数,输出最大值和最小值。 #include<stdio.h>int main(){ int a,b,c,max,min; printf("input three numbers:"); scanf("%d%d%d",&a,&b,&c); if(a>b) {max=a;min=b;} e ...
分类:其他好文   时间:2019-01-09 21:40:24    阅读次数:145
1549条   上一页 1 ... 22 23 24 25 26 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!