码迷,mamicode.com
首页 >  
搜索关键字:int-max    ( 1549个结果
Trie树模板
static final int max=100005; //所有字符总数 static int son[][]=new int[max][26];//son数组存储每个节点的儿子;一维表示父节点下标,二维表示小写字母 son[x][0~25] static int cnt[]=new int[ma ...
分类:其他好文   时间:2020-01-26 14:29:52    阅读次数:55
zip解压及zip炸弹的防御
解压功能验证正常,zip炸弹防御部分还没验证完,后续验证后再确认 private static final int MAX_COUNT = 10000; // 注意,long类型后面要加L private static final long MAX_SIZE = 4L * 1024 * 1024 * ...
分类:其他好文   时间:2020-01-22 01:16:37    阅读次数:346
贪心-Bag of Tokens
2020-01-20 22:32:28 问题描述: 问题求解: 双指针 + 贪心。 public int bagOfTokensScore(int[] tokens, int P) { Arrays.sort(tokens); int res = 0; int curr = 0; int l = 0 ...
分类:其他好文   时间:2020-01-21 00:44:41    阅读次数:79
关于OI(C/C++)的各种优化
一.常量 声明常量可以方便代码的修改,提高复用性. const int maxn=10000; const int N=10000+10; const double exp=1e-6; 同时,声明常量也可以减少重复运算,提高代码速度,例子如下: string s; cin>>s; for(int i ...
分类:编程语言   时间:2020-01-20 18:45:27    阅读次数:86
全排列模板
1.回溯法-dfs(sort后,然后dfs,数列是按字典序的) import java.util.Arrays; import java.util.Scanner; public class Main { static int n; static final int max=1005; static ...
分类:其他好文   时间:2020-01-16 12:46:57    阅读次数:74
C语言------三目运算符(条件运算符)
今天在看C语言的时候看到了下面的代码(废话少说,直接上代码): #include <stdio.h> int main() {int max(); extern int A,B,C; //把外部变量A,B,C的作用域扩展到从此处开始 printf("Please enter three intege ...
分类:编程语言   时间:2020-01-16 12:32:45    阅读次数:148
Java 笔试题
有一些还是存在问题,欢迎大家一起探讨。 在Java类中,使用以下( )声明语句来定义公有的int型常量MAX。 A. public int MAX = 100; B. final int MAX = 100; C.public static int MAX = 100; D. public stat ...
分类:编程语言   时间:2020-01-14 13:25:28    阅读次数:1044
C++常用库函数
C++常用库函数 C++常用库函数 1.缓冲区操作函数 函数名:memchr 函数原型:void *memchr(const void *buf,int c,sizet count); 参数:buf 缓冲区的指针;c 查找的字符;count 检查的字符个数。 所需头文件:<cstring> 功能:查 ...
分类:编程语言   时间:2020-01-13 21:54:41    阅读次数:84
算法初步——贪心B1023.组个最小数
#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int MAX_LEN = 100005; int main(){ int temp[10]; for(int i =0;i< ...
分类:编程语言   时间:2020-01-08 23:11:03    阅读次数:124
CCF买菜(python)
n = int(input())H = []H1 = []W = []W1 = []CountTime = 0for i in range(n): list_H = input().split() H.append(int(list_H[0])) H1.append(int(list_H[1]))f ...
分类:编程语言   时间:2020-01-08 00:27:03    阅读次数:131
1549条   上一页 1 ... 10 11 12 13 14 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!