码迷,mamicode.com
首页 >  
搜索关键字:int-max    ( 1549个结果
JDK线程池和Spring线程池的使用
JDK线程池和Spring线程池实例,异步调用,可以直接使用 (1)JDK线程池的使用,此处采用单例的方式提供,见示例: public class ThreadPoolUtil { private static int corePoolSize = 5; private static int max ...
分类:编程语言   时间:2019-11-28 22:57:57    阅读次数:209
【C语言】创建一个函数,并调用比较两个数的大小
#include <stdio.h> int max(int x,int y) { if(x>=y) return x; else return y; } main() { int a,b; printf("请输入2个数字:\n"); scanf("%d%d",&a,&b); printf("最大值 ...
分类:编程语言   时间:2019-11-27 16:16:24    阅读次数:85
leetcode334 递增的三元子序列
class Solution { public: bool increasingTriplet(vector<int>& nums) { //使用双指针; int len=nums.size(); if(len<2) return false; int first=INT_MAX,second=IN ...
分类:其他好文   时间:2019-11-20 12:19:38    阅读次数:47
训练11
4012: What is the Rank? 题意:给定n个数,按顺序将数添加进集合中,并输出该数在当前集合中是第几大 #include<bits/stdc++.h> using namespace std; const int Max=45005; struct node { int x,y; ...
分类:其他好文   时间:2019-11-15 14:21:06    阅读次数:85
力扣初级算法——整数反转
实现代码: class Solution { public: int reverse(int x) { int rev=0; while(x!=0) { int pop=x%10; x=x/10; if(rev>INT_MAX/10 ||(rev==INT_MAX/10 && pop>7)) ret ...
分类:编程语言   时间:2019-11-11 21:23:27    阅读次数:174
11/9 <Stack> 155 232 225
155. Min Stack class MinStack { int min = Integer.MAX_VALUE; Stack<Integer> stack = new Stack<Integer>(); /** initialize your data structure here. */ ...
分类:其他好文   时间:2019-11-09 19:27:34    阅读次数:90
自定义参数验证
public class RangeValueAttribute : ValidationAttribute { public int Min { get; set; } public int Max { get; set; } protected override ValidationResult ...
分类:其他好文   时间:2019-11-07 15:01:00    阅读次数:68
求最大公约数伪代码
算法:def Euclidean(a, b): max = a if a b else b min = b if a b else a if max % min == 0: return min else: return Euclidean(min, max min int(max/min)) 链接 ...
分类:其他好文   时间:2019-11-04 11:36:18    阅读次数:539
10.23
[TOC] (revision)货车运输 最大生成树的正确性 图是森林时用并查集维护两点是否相连。 赋值为INT_MAX的妙用 w[u] [i]表示的时跳到f[u] [i]的沿途边权最小值。既然是求最小值,不要忘了赋初值 【线段树 带修改最大字段和】 (link)小白逛公园 【欧拉函数】 (link ...
分类:其他好文   时间:2019-11-03 11:11:01    阅读次数:110
算法题
写一个函数找出一个整数数组中,第二大的数 1 #include <stdio.h> 2 3 int max(int a, int b) 4 { 5 return a>b?a:b; 6 } 7 8 int min(int a, int b) 9 { 10 return a<b?a:b; 11 } 12 ...
分类:编程语言   时间:2019-11-03 01:10:49    阅读次数:98
1549条   上一页 1 ... 13 14 15 16 17 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!