为什么Hashtable ConcurrentHashmap不支持key或者value为null ...
分类:
其他好文 时间:
2019-05-26 23:42:10
阅读次数:
604
时区转时间戳,有人会很奇怪 。时间戳不就是当前时间到1970年1月1日 0时0分0秒的吗? 需要转吗? 最近有一个需求是需要的,解释 是这样的 :返回的时间戳是根据你当前时区 转到1970年1月1日 0时0分0秒的 如果你是在另外一个时区要访问另一个时区的数据 传参就需要进行转换(不知道我有没有理解 ...
分类:
其他好文 时间:
2019-05-26 22:25:39
阅读次数:
273
1.Algorithm https://leetcode-cn.com/problems/merge-two-sorted-lists/ 方法 1:递归 想法 我们可以如下递归地定义在两个链表里的 merge 操作(忽略边界情况,比如空链表等): \left\{ \begin{array}{ll} ...
分类:
其他好文 时间:
2019-05-26 19:52:25
阅读次数:
150
最短路练习 0. Til the Cows Come Home POJ - 2387 完美的模板题 1 //#include<Windows.h> 2 #include<iostream> 3 #include<algorithm> 4 #include<cstring> 5 #include<cs ...
分类:
其他好文 时间:
2019-05-26 19:46:25
阅读次数:
157
class Solution { public String removeOuterParentheses(String S) { int outer = 0; int inner = 0; char[] intput = S.toCharArray(); char[] output = new c... ...
分类:
其他好文 时间:
2019-05-26 19:40:10
阅读次数:
124
实验程序: package 实验九; import java.util.Scanner; public class Point { static int x; static int y; Point(int x,int y){ Point.x=x; Point.y=y; } @SuppressWar ...
分类:
其他好文 时间:
2019-05-26 19:37:57
阅读次数:
112
1,运营商的挑战: 1,在下图标出的城市间架设一条通信线路; 2,要求: 1,任意两个城市间都能够通信; 2,将架设成本降至最低; 2,问题抽象: 1,如何在图中选择 n - 1 条边使得 n 个顶点间两两可达,并且这 n - 1 条边的权值之和最小? 3,最小(大)生成树: 1,仅使用图中的 n ...
分类:
其他好文 时间:
2019-05-26 17:45:52
阅读次数:
93
题目描述 你有一组非零数字(不一定唯一),你可以在其中插入任意个0,这样就可以产生无限个数。比如说给定{1,2},那么可以生成数字12,21,102,120,201,210,1002,1020,等等。 现在给定一个数,问在这个数之前有多少个数。(注意这个数不会有前导0). 输入输出格式 输入格式: ...
分类:
其他好文 时间:
2019-05-26 17:35:32
阅读次数:
75
看学长的模板然后改了一下 要注意每次询问时pushdown 然后就是这道题要注意开longlong 从学长那里学来的*1ll好像对我并没有什么用QAQ 1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #include<c ...
分类:
其他好文 时间:
2019-05-26 16:26:54
阅读次数:
100