摘要: 这里我用的是ubuntu18.04 x64(容易上手的系统)系统搭建的lamp1. 安装apache2sudo apt-get install apache22. 安装php7sudo apt-get install php7.0(注意,要加点零,以前的或许... 阅读全文
posted @ 2018-08-16 16:28 i-Curve 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 首先介绍一下逆序数。对于一个序列,它的逆序数就是指这个序列的其中两个数前后位置和大小顺序相反。例如序列14532,其中5、 3是一对逆序数,5、 2也是一对逆序数。等等解法1. n^2复杂度的暴力直接暴力枚举即可```c++int s[inf],sum=0;... 阅读全文
posted @ 2018-08-16 16:22 i-Curve 阅读(2079) 评论(0) 推荐(0) 编辑
摘要: kmp算法是用来对字符串进行匹配的一种算法。对于长度为n的字符串N,要查找其中长度为m的一个字符串M,传统的暴力方法的复杂度为O( n*m ),而用kmp算法时间复杂度为O( m+n )。因此,kmp算法是一种很实用的算法,在acm竞赛中是一种必会算法之一K... 阅读全文
posted @ 2018-08-08 17:41 i-Curve 阅读(932) 评论(0) 推荐(0) 编辑
摘要: Let’s call an undirected graph G=(V,E)relatively prime if and only if for each edge (v,u)∈E GCD(v,u)=1 (the greatest common divi... 阅读全文
posted @ 2018-07-23 13:23 i-Curve 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Alice got an array of length nn as a birthday present once again! This is the third year in a row!And what is more disappointing,... 阅读全文
posted @ 2018-07-23 12:37 i-Curve 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 大家好!今天给大家介绍如何在linux系统上开启ssh服务,并实现远程登录。先说明一下,我的系统是deepin15.6桌面版的体统安装ssh-server sudo apt-get install openssh-server linux缺省安装了opens... 阅读全文
posted @ 2018-07-20 17:24 i-Curve 阅读(1716) 评论(0) 推荐(0) 编辑
摘要: 定义:康托展开是一个全排列到一个自然数的双射,常用于构建哈希表时的空间压缩。 康托展开的实质是计算当前排列在所有由小到大全排列中的名次,因此是可逆的。原理介绍**X = A[0] * (n-1)! + A[1] * (n-2)! + … + A[n-1] ... 阅读全文
posted @ 2018-07-11 17:24 i-Curve 阅读(681) 评论(0) 推荐(0) 编辑
摘要: Since Sonya is interested in robotics too, she decided to construct robots that will read and recognize numbers.Sonya has drawn n... 阅读全文
posted @ 2018-07-06 13:54 i-Curve 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Sonya decided to organize an exhibition of flowers. Since the girl likes only roses and lilies, she decided that only these two k... 阅读全文
posted @ 2018-07-06 13:44 i-Curve 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Sonya decided that having her own hotel business is the best way of earning money because she can profit and rest wherever she wa... 阅读全文
posted @ 2018-07-06 13:39 i-Curve 阅读(134) 评论(0) 推荐(0) 编辑