今天在windows7_x64上安装JDK的时候提示IllegalArgumentException:Invalid characters in hostname, 解决方法: 1.打开【控制面板\系统和安全\系统】,点击【更改设置】 2.修改计算机名 3.重启计算机后再安装JDK(安装之前最好删除 ...
分类:
其他好文 时间:
2018-09-10 22:26:38
阅读次数:
433
给定一个只包括 '(',')','{','}','[',']' 的字符串,判断字符串是否有效。 有效字符串需满足: 注意空字符串可被认为是有效字符串。 示例 1: 示例 2: 示例 3: 示例 4: 示例 5: 当时想想好复杂啊,结果以提交报错执行时间太长,回头想想是我忽略了一些东西。由于限定条件内 ...
分类:
其他好文 时间:
2018-09-10 13:38:49
阅读次数:
232
Morgana is playing a game called End Fantasy VIX. In this game, characters have nn skills, every skill has its damage. And using skill has special con ...
分类:
其他好文 时间:
2018-09-10 00:53:52
阅读次数:
466
思路: 尺取法。 循环i:1~26,分别计算恰好包含i种字母并且每种字母出现的次数大于等于k个的最长子串长度。 没法直接使用尺取法,因为不满足区间单调性,但是使用如上的方法却是可以的,因为子串中包含的字母种类数是满足区间单调性的。 实现: ...
分类:
其他好文 时间:
2018-09-09 21:05:54
阅读次数:
185
I. Characters with Hash Mur loves hash algorithm, and he sometimes encrypt another one's name, and call him with that encrypted value. For instance, h ...
分类:
其他好文 时间:
2018-09-09 18:14:52
阅读次数:
293
用于模型的训练 1.说明: lightgbm.train(params, train_set, num_boost_round=100, valid_sets=None, valid_names=None, fobj=None, feval=None, init_model=None, featur ...
分类:
其他好文 时间:
2018-09-09 15:26:27
阅读次数:
1108
题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. 给定一个只包含字符'(',')','{','}','[ ...
分类:
其他好文 时间:
2018-09-09 15:15:15
阅读次数:
161
Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains o ...
分类:
其他好文 时间:
2018-09-09 12:05:46
阅读次数:
136
这道题主要用栈来实现的。什么是栈呢,参照书上的后缀表达式的例子谈谈自己的理解,栈最明显的特征是先进后出。所以可以有效的结合题目中 ()对匹配问题,可以把从列表中获取的符号先存到栈中。 首先建个空列表用于映射栈中元素。然后挨个查询传递过来的列表的每个元素,不在栈中就压进栈,在的话再看看是不是栈顶元素。 ...
分类:
编程语言 时间:
2018-09-09 00:44:30
阅读次数:
141
题目: Given two strings s and t, determine if they are isomorphic. 给定两个字符串s和t,确定它们是否是同构的。 Two strings are isomorphic if the characters in s can be repla ...
分类:
其他好文 时间:
2018-09-08 11:42:27
阅读次数:
158