含义 扩展运算符( spread )是三个点(...)。它好比 rest 参数的逆运算,将一个数组转为用逗号分隔的参数序列。 该运算符主要用于函数调用。 array.push(...items)和add(...numbers)这两行,都是函数的调用,它们的都使用了扩展运算符。该运算符将一个数组,变为 ...
分类:
编程语言 时间:
2019-06-10 13:49:39
阅读次数:
94
我还真没想出来……不要怪我哦…… 我想的是一直往堆里塞数,知道数的个数超多n很多。 首先,这个超过很多很难把控,其次,复杂度不允许。 于是我们考虑一波dp: f [ i ] 表示第i个丑数,那么这个丑数 f [ i ] 一定等于 f [ k ] * a [ j ] (其中 k < i )。 那么我们 ...
分类:
其他好文 时间:
2019-06-09 18:10:52
阅读次数:
76
本文同步发布在CSDN:https://blog.csdn.net/weixin_44385565/article/details/91349859 1096 Consecutive Factors (20 分) 1096 Consecutive Factors (20 分) 1096 Consec ...
分类:
其他好文 时间:
2019-06-09 09:45:37
阅读次数:
93
1 排序 1.1 冒泡排序 1 #include <stdio.h> 2 int main() 3 { 4 int i,j,tmp,a[6]; 5 printf("input six int numbers:\n"); 6 for(i=0;i<6;i++) 7 { 8 scanf("%d",&a[i ...
分类:
编程语言 时间:
2019-06-08 00:28:44
阅读次数:
143
43. 字符串相乘 43. Multiply Strings 题目描述 给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式。 LeetCode43. Multiply Strings中等 示例 1: 输入: num1 = " ...
分类:
其他好文 时间:
2019-06-07 22:57:57
阅读次数:
125
You are given an array 𝑎1,𝑎2,…,𝑎𝑛 and an integer 𝑘 . You are asked to divide this array into 𝑘 non-empty consecutive subarrays. Every element in ...
分类:
编程语言 时间:
2019-06-07 20:52:57
阅读次数:
106
Where is the Marble? Descriptions: Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the begin ...
分类:
编程语言 时间:
2019-06-07 16:44:47
阅读次数:
116
三次握手 在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接. 第一次握手:建立连接时,客户端发送syn包(syn=j)到服务器,并进入SYN_SEND状态,等待服务器确认; SYN:同步序列编号(Synchronize Sequence Numbers) 第二次握手:服务 ...
分类:
其他好文 时间:
2019-06-07 14:24:47
阅读次数:
101
Given a hash table of size N, we can define a hash function (. Suppose that the linear probing is used to solve collisions, we can easily obtain the s ...
分类:
其他好文 时间:
2019-06-06 12:30:44
阅读次数:
511
题目描述: 小Q今天在上厕所时想到了这个问题:有n个数,两两组成二元组,相差最小的有多少对呢?相差最大呢? 输入描述 : 输入包含多组测试数据。 对于每组测试数据: N - 本组测试数据有n个数 a1, a2...an - 需要计算的数据 保证 : 1 <= N <= 100000, 0 <= ai ...
分类:
其他好文 时间:
2019-06-04 16:11:30
阅读次数:
106