Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloon ...
分类:
其他好文 时间:
2020-07-19 18:05:12
阅读次数:
68
三种方式 第二个比较好 导入包 <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjw ...
分类:
编程语言 时间:
2020-07-19 17:58:40
阅读次数:
70
题目描述 Since you are the best Wraith King, Nizhniy Magazin «Mir» at the centre of Vinnytsia is offering you a discount. You are given an array a a a of ...
分类:
其他好文 时间:
2020-07-19 17:51:34
阅读次数:
56
$arr = array(1,3,2,4,5,6,9,10,15,11);$len = count($arr);for($i=0;$i<$len;$i++){ for($k=$i+1;$k<$len;$k++){ if($arr[$i] > $arr[$k]){ $tmp = $arr[$k]; $ ...
分类:
编程语言 时间:
2020-07-19 17:50:21
阅读次数:
53
isset 检查一个变量是否为空 返回值:变量只要不是null 返回true,否则返回false 既:变量的值为 "" (空字符串), 0 (作为整数的0), 0.0 (作为浮点数的0), "0" (作为字符串的0), FALSE,array() (一个空数组) 不是null返回true 变量的值为 ...
分类:
Web程序 时间:
2020-07-19 16:25:59
阅读次数:
102
. 1.看以上错误 "TypeError: Cannot read property 'path' of null".说明是执行了null.path导致报错, 那么正常情况下应该是有一个数组,path是数组里面的其中一个值,但是返回的数据为null,赋值给了这个数组。 所以执行array.path时 ...
分类:
其他好文 时间:
2020-07-19 16:25:04
阅读次数:
84
广播变量object Main { def main(args: Array[String]): Unit = { val sparkConf = new SparkConf().setAppName("readMysql").setMaster("local[2]") val sparkConte ...
分类:
其他好文 时间:
2020-07-19 11:44:16
阅读次数:
62
package LeetCode_1060 /** * 1060. Missing Element in Sorted Array * (Prime) * Given a sorted array A of unique numbers, find the K-th missing number s ...
分类:
其他好文 时间:
2020-07-19 00:49:27
阅读次数:
93
题目链接:https://ac.nowcoder.com/acm/contest/5666/A 想法: 我们可以发现以下的一些规律 对于任意后缀其B数组的第一个元素一定为0,并且B数组的开头一定为01111(1的个取决于开头有多少个连续的相同字符) 【当然也可以是 00 这种情况,比如 ab 】 例 ...
分类:
其他好文 时间:
2020-07-19 00:38:09
阅读次数:
56
题目描述 有一个长为 n 的序列 a,以及一个大小为 k 的窗口。现在这个从左边开始向右滑动,每次滑动一个单位,求出每次滑动后窗口中的最大值和最小值。 例如: The array is [1,3,-1,-3,5,3,6,7]] and k=3。 输入格式 输入一共有两行,第一行有两个正整数 n,k。 ...
分类:
其他好文 时间:
2020-07-19 00:33:24
阅读次数:
74