码迷,mamicode.com
首页 > 全部
hdu 5775
对1~n的乱序数冒泡排序过程,求解每一个数能到达的最左和最右的位置差 本质就是求解每一个数右边有多少小于他的数,加上现在的位置既是能到达的最右位置,最左位置很直观 用树状数组或者线段树 渣渣现在才发现代码里的线段树比硬来时间复杂度低 线段树代码 树状数组 ...
分类:其他好文   时间:2016-07-30 13:17:00    阅读次数:191
260. Single Number III [medium] (Python)
题目链接https://leetcode.com/problems/single-number-iii/题目原文 Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two e...
分类:编程语言   时间:2016-07-30 12:14:59    阅读次数:218
UVA340 UVALive5448 Master-Mind Hints
Regionals 1995 >> North America - North Central NA 问题链接:UVA340 UVALive5448 Master-Mind Hints。基础训练题,用C语言编写程序。 题意:输入多组测试用例,每个用例第1个数为n,n=0时结束。后面有若干行,每行输入n个正整数(值范围为1到9),第1行是n个秘密数(需要猜测的数),第2行开始是猜测的n个数,...
分类:其他好文   时间:2016-07-30 12:13:13    阅读次数:204
72【leetcode】经典算法- Lowest Common Ancestor of a Binary Search Tree(lct of bst)
题目描述:一个二叉搜索树,给定两个节点a,b,求最小的公共祖先 _______6______ / ___2__ ___8__ / \ / 0 _4 7 9 / 3 5例如:2,8 —->6...
分类:编程语言   时间:2016-07-30 12:14:38    阅读次数:184
poj3126——Prime Path(BFS)
DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a m...
分类:其他好文   时间:2016-07-30 12:13:16    阅读次数:179
Hdu 3365 New Ground(计算几何)
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3365 思路: 以A[0]为原点,构造向量A[i]-A[0]。先旋转(注意旋转方向),再伸缩,最后平移至终点。 #include #include #include #include #include #define debu using namespace std; const double ...
分类:其他好文   时间:2016-07-30 12:12:44    阅读次数:278
HDU 3723 Delta Wave(默慈金数)
传送门 Delta WaveTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1160    Accepted Submission(s): 370Problem Description A delta wave is a high am...
分类:其他好文   时间:2016-07-30 12:11:31    阅读次数:147
android索引
项目需要,今天学习了一下索引 涉及到的技术: 绘制右侧的索引条 点击某个字母,定位到ListView控件的指定位置 AndroidUI效果--开源项目IndexableListView(字母索引) 2013年12月13日开源项目IndexableListView的学习 开发通讯录相关的应用的时候可能会需要这种效果,索引这种效果...
分类:移动开发   时间:2016-07-30 12:10:48    阅读次数:280
Hdu 3366 Passage (概率DP)
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3366 思路:如果已知行走顺序,则可通过DP求解。要使得选择最优,则应按p/q从大到小的顺序选择(遇到士兵的几率越小,出去几率越大的路应首先考虑)。 d[i][j]表示在第i条路,还有j的钱能够出去的概率,则若能直接出去ans+=[i][j]*p[i],若遇到士兵d[i+1][j-1]+=d[i][...
分类:其他好文   时间:2016-07-30 12:12:06    阅读次数:372
238. Product of Array Except Self [medium] (Python)
题目链接https://leetcode.com/problems/product-of-array-except-self/题目原文 Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the eleme...
分类:编程语言   时间:2016-07-30 12:13:13    阅读次数:210
20个为前端开发者准备的文档和指南
是时候重新学习了!和以前一样,我收集了很多不同的学习资源,包括学习指南,学习文档,和其他有用的网站来帮助你在前端开发的不同领域里快速地进入状态。 所以请尽情享受我们的文档和指南系列的第九部分,并且不要忘了在评论区让我知道任何我没有找到的。 1. JavaScript Standard Style(J ...
分类:其他好文   时间:2016-07-30 12:10:29    阅读次数:230
C#调用exe文件,IIS发布后无法掉用本地exe程序的解决方法
http://blog.csdn.net/junjieking/article/details/6277836?reload这位楼主的问题,我也遇到了,但是我按照他那样操作并没有解决问题,弄了好久终于找到解决方案了,方案如下:IIS管理器——应用程序池——设置应用程序池默认设置——进程模型——标识, ...
分类:Windows程序   时间:2016-07-30 12:11:08    阅读次数:501
[JSP] c:forEach 输出序号 每行自动生成序号
关键在于<c:forEach>的varStatus属性,具体代码如下: <table width="500" border="0" cellspacing="0" cellpadding="0"> <tr> <th>序号</th> <th>姓名</th> </tr> <c:forEach var=" ...
分类:Web程序   时间:2016-07-30 12:11:04    阅读次数:1309
韦东山笔记之用busybox构建根文件系统
1 百度搜索busybox进入busybox官网(https://busybox.net/) 点击左侧DownloadSource下载最新稳定版的busybox-1.24.2.tar.bz2 2 将其复制到服务器并解压缩tar xjf busybox-1.24.2.tar.bz23进入根目录,在其根... ...
分类:其他好文   时间:2016-07-30 12:09:47    阅读次数:871
DOCTYPE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ 此博文包含图片 (2012-12-21 10:14:19)转载▼标签: doctype 文档定义类型 dw ...
分类:其他好文   时间:2016-07-30 12:12:16    阅读次数:247
Oracle中添加新用户并赋予权限
--创建一个新用户NewUser 并设置密码为1 create user NewUser identified by 1; --为该用户赋予权限 grant connect , Resource to NewUser; ...
分类:数据库   时间:2016-07-30 12:10:04    阅读次数:189
JS权威指南读书笔记(二)
第四章 表达式和运算符 1 new调用构造函数的过程 a 创建一个新的空对象 b 设置空对象的_proto_指向构造函数原型prototype c 将这个新对象当做this的值来调用构造函数 d 如果构造函数不返回一个对象值,则返回新对象 2 左值:表示存储在计算机内存的对象。 3 除数为0的运算结 ...
分类:Web程序   时间:2016-07-30 12:10:22    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!