码迷,mamicode.com
首页 >  
搜索关键字:not find    ( 24186个结果
leetcode 16 3Sum Closest
题目内容 Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of th ...
分类:其他好文   时间:2020-01-29 18:24:31    阅读次数:58
畅通工程再续 HDU - 1875
#include<iostream> #include<algorithm> #include<cstring> #include<cmath> using namespace std; #define x first #define y second const int N=210; typede ...
分类:其他好文   时间:2020-01-29 17:52:38    阅读次数:92
leedCode练题——14. Longest Common Prefix
1、题目 14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, re ...
分类:其他好文   时间:2020-01-29 17:50:57    阅读次数:65
一段完整的批量下载网站视频资源的python爬虫代码(附注解)
# 本程序为学习代码,成功爬取了'梨视频'网站的全部视频文件,并保存在video文件夹 import os import re import requests def getHTMLText(url): try: r=requests.get(url) r.raise_for_status() r. ...
分类:编程语言   时间:2020-01-29 16:27:45    阅读次数:434
数据结构与算法——哈希函数和哈希表等(2)
S 城现有两座监狱,一共关押着N 名罪犯,编号分别为1~N。他们之间的关系自然也极不和谐。很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。如果两名怨气值为c 的罪犯被关押在同一监狱, ...
分类:编程语言   时间:2020-01-29 15:45:51    阅读次数:70
Jungle Roads POJ - 1251 模板题
#include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N=0x3f3f3f3f; int p[50]; struct edge{ int a,b,w; }e[100]; bool ...
分类:其他好文   时间:2020-01-29 12:11:08    阅读次数:72
MongoDB 1.6. 数据查询
数据查询 基本查询 方法find():查询 db.集合名称.find({条件文档}) 方法findOne():查询,只返回第一个 db.集合名称.findOne({条件文档}) 方法pretty():将结果格式化 db.集合名称.find({条件文档}).pretty() 比较运算符 等于,默认是等 ...
分类:数据库   时间:2020-01-29 10:57:22    阅读次数:109
模块一:shell 脚本基础
一、shell脚本介绍 (一)脚本案例及介绍: !/bin/bash LOG_DIR=/var/log ROOT_UID=0 if ["$UID ne "$ROOT_UID"] then echo "must be root run this script." exit 1 fi cd $ LOG_ ...
分类:系统相关   时间:2020-01-29 01:14:22    阅读次数:99
linux下 find命令使用
按名称查找 find . -name filename [root@vps repo]# ls README.md vps.sh[root@vps repo]# find . -iname vps*./vps.sh[root@vps repo]# find . ! -iname vps* | gre ...
分类:系统相关   时间:2020-01-28 23:35:05    阅读次数:131
[Leetcode]653.Two Sum IV - Input is a BST
链接: "LeetCode653" 给定一个二叉搜索树和一个目标结果,如果 BST 中存在两个元素且它们的和等于给定的目标结果,则返回 true。 相关标签: 哈希表 类似于求两数之和,我们只需要在遍历二叉树过程中寻找是否存在有数为k 已经遍历到的数即可。 代码如下: python: C++: ...
分类:其他好文   时间:2020-01-28 22:58:39    阅读次数:75
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!