#include #include #include #include #include using namespace std; class LogFile { public: LogFile() { f.open("log.txt"); } ~LogFile() { } void shared_... ...
分类:
编程语言 时间:
2019-09-17 12:53:35
阅读次数:
194
https://leetcode.com/problems/unique-paths/ Medium Medium Medium A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diag ...
分类:
其他好文 时间:
2019-09-14 19:30:03
阅读次数:
100
在mysql的技术文档里面有如下文字: If you do not define a PRIMARY KEY for your table, MySQL picks the first UNIQUE index that has only NOT NULL columns as the primar ...
分类:
数据库 时间:
2019-09-14 18:54:55
阅读次数:
538
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p ...
分类:
其他好文 时间:
2019-09-14 00:17:29
阅读次数:
98
方法一:创建一个新的临时数组来保存数组中已有的元素 Array.prototype.unique = function(){ let uniqueArr = []; for(let i = 0; i { return a b }) for(let i = 1; i ...
分类:
编程语言 时间:
2019-09-12 23:21:50
阅读次数:
64
In this challenge, you will create the username portion of a registration system. All usernames must be unique. If a new user requests a name that is ...
分类:
其他好文 时间:
2019-09-12 18:36:50
阅读次数:
123
1、城市的编号不是从0到n-1,而是随便的一个数字,需要离散化否则不能存相关信息 2、城市数不超过30,也就是说我的方法开矩阵不超过60,但是我残念的一开始以为最多可能有20000个不同城市 血崩! 3、图中可能有重边,所以别用=1,要用++操作 4、询问中v1,v2可能在前面的城市编号集中没有出现 ...
分类:
其他好文 时间:
2019-09-12 00:10:05
阅读次数:
83
题意:https://codeforc.es/problemset/problem/195/D 求折线段数。 思路: 对pos进行sort,对不同区间段加k,两个dp处理不同k>0 or k<0前后缀,判断即可。 注意:long double,ESP=1e-20。 ...
分类:
其他好文 时间:
2019-09-11 22:18:50
阅读次数:
111
array_unique函数就是可以处重的,它具备了这个功能了,下面我们一来看一个关于PHP使用array_unique对二维数组去重处理例子。 php 5.2.9 版本增加了array_unique对多维数组的支持,在处理多维数组是需要设置sort_flags参数 一维数组的重复项: 使用arra ...
分类:
编程语言 时间:
2019-09-11 18:31:12
阅读次数:
104