自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 基数排序之LSD实现

int exp = 1; // 1, 10, 100, 1000 ... int radix = 10; // base 10 system vector<int> aux(nums.size()); /* LSD Radix ...

2019-09-22 15:57:58 276

原创 OCR数据集

文本识别数据集:1.SynthText in the Wild datasetThis dataset consists of 8 million images covering 90k English words, and includes the training, validation and test splits used in our work.该数据集包含8百万张图片,涵盖9万...

2019-08-14 17:21:49 9200 1

原创 tvm部署c++神经网络前向代码到android端

tvm部署c++神经网络前向代码到android端tvm部署c++神经网络前向代码到android端模型生成交叉编译工具tvm下载和编译编译onnx移动端部署tvm部署c++神经网络前向代码到android端tvm是端到端的神经网络编译器。简单来说,他可以把神经网络模型编译成一个动态链接库,并部署到各种硬件上去执行,包括移动设备。模型tvm可以支持编译各种框架模型,包括tflite,onn...

2019-05-17 18:22:29 3708 3

原创 解决vim编辑器显示乱码

vim ~/vimrc,设置编码和文件编码为utf-8:set encoding=utf-8set fileencoding=utf-8保存 :wq

2019-04-28 11:16:05 1085

原创 Largest Rectangle in Histogram

Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width of e...

2018-09-05 13:22:15 195 1

原创 用sort对vector排序

分为升序和降序两排序方式:vector&lt;int&gt;v;sort(v.begin(), v.end(),less&lt;int&gt;());//升序sort(v.begin(), v.end(),greater&lt;int&gt;());//降序 

2018-08-30 14:39:59 8958 3

原创 下一个排列

产生一个数字序列的下一个排列(按照字典序),算法如下:序列长为n,从后往前找到第一个使得a[i-1]&lt;a[i]的下标 i ,从[ i , n ]找到一个大于a[i-1]的最小的a[j],交换a[i-1]与a[j],交换后把[ i, n] 全部逆序排列,此时就是原序列的下一个字典序排列。如下图所示。并附c++代码。class Solution {public: void...

2018-08-28 19:41:55 325

原创 寻找三个数的和为0

问题描述:Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. 给定一个长度为n的数字串,是否存在三个元素a,b,c使得a+b+c...

2018-08-27 17:45:38 840 2

原创 C++子串substr的用法

头文件#include&lt;string&gt;string s="0123456789"; string a=s.substr(1,5);string b=s.substr(1);上面代码中a="12345";   b="123456789";  第二个参数缺省值为串末尾。

2018-08-27 14:23:09 4161

原创 最长回文子串

问题描述:给定一个字符串S,找出它的最长回文子串。Input: "babad"Output: "bab"Note: "aba" is also a valid answer. Input: "cbbd"Output: "bb" 思路:可以采用动态规划思想,定义dp[i][j]为 dp[i][j]=  true (如果子串 Si…Sj 是一个回文串)     ...

2018-08-26 16:28:40 144

转载 暗黑的字符串

链接:https://www.nowcoder.com/questionTerminal/7e7ccd30004347e89490fefeb2190ad2来源:牛客网一个只包含'A'、'B'和'C'的字符串,如果存在某一段长度为3的连续子串中恰好'A'、'B'和'C'各有一个,那么这个字符串就是纯净的,否则这个字符串就是暗黑的。例如:BAACAACCBAAA 连续子串"CBA"中包含了'A'...

2018-08-19 16:04:02 407

转载 跳石板

链接:https://www.nowcoder.com/questionTerminal/4284c8f466814870bae7799a07d49ec8来源:牛客网小易来到了一条石板路前,每块石板上从1挨着编号为:1、2、3.......这条石板路要根据特殊的规则才能前进:对于小易当前所在的编号为K的 石板,小易单次只能往前跳K的一个约数(不含1和K)步,即跳到K+X(X为K的一个非1...

2018-08-19 15:09:26 156

原创 设置cin不忽略空格

cin读取字符是会忽略空格和换行的,可以用noskipws设为不跳过空格或者换行。char step;cin&gt;&gt;noskipws&gt;&gt;step; 

2018-08-16 15:08:17 7156

原创 Python连接MySQL报错:Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

产生错误的原因是没有在/var/lib/mysql/目录下找到mysql.sock文件导致的。输入查找命令行命令:find / -name mysql.sock在我的系统中输出如下,表明mysql.sock在/tmp/目录下/tmp/mysql.sock于是将修改代码如下,即可解决该问题。import MySQLdbdb = MySQLdb.connect("loc...

2018-08-05 19:21:22 1670

原创 ODBC连接MySQL

C++使用ODBC连接MySQL

2018-05-12 22:54:35 74969 13

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除