码迷,mamicode.com
首页 > 2015年04月09日 > 全部分享
[JAVA]LeetCode199 Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example: Given the following binary tree, 1...
分类:编程语言   时间:2015-04-09 22:02:12    阅读次数:145
POJ1273 Drainage Ditches【最大流】【SAP】
题目大意: 农民John的田里有M个池塘和N条水沟用来排水,池塘编号为1~M,1号池塘是所有水沟的源点, M号池塘是水沟的汇点。给你N条水沟所连接的池塘和所能流过的水量,求整个水沟从源点到汇点 最多能流多少水。 思路: 很明显的求网络流最大流问题。用链式前向星(邻接表)来存储网络,这样就不用考虑重边问题了。这 里的重边其实就是平行边。用SAP算法+GAP优化来求最大流就可以了。SAP+GAP模板参考我的另 一篇博文:http://blog.csdn.net/lianai911/article/detail...
分类:其他好文   时间:2015-04-09 22:01:59    阅读次数:175
【矩阵快速幂】POJ 3070 Fibonacci (大数 Fibonacci)(大二版)
题目链接:click here~~ 题目大意: In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn ? 1 + Fn ? 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are: 0, 1, 1, 2, 3,...
分类:其他好文   时间:2015-04-09 22:03:58    阅读次数:141
IOS 记录用户登陆状态 第二次免登陆
NSUserDefault是苹果提供给我们用来存储用户的登陆信息的持久化类。下面用实例看下记录登陆状态的过程...
分类:移动开发   时间:2015-04-09 22:03:37    阅读次数:202
设计模式 笔记 抽象工厂模式 Abstract Factory
//---------------------------15/04/09---------------------------- //Abstract Factory 抽象工厂----对象创建型模式 /*     1:意图:提供一个创建一系列相关或相互依赖对象的接口,而无需制定他们具体的类。     2:别名:Kit     3:动机...
分类:其他好文   时间:2015-04-09 22:03:48    阅读次数:141
[LeetCode]Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For example: Given the following binary tre...
分类:其他好文   时间:2015-04-09 22:02:36    阅读次数:117
word2vec中 distence.c 文件源码分析
#include #include #include //#include #include const long long max_size = 2000; // max length of strings const long long N = 5;...
分类:其他好文   时间:2015-04-09 22:00:36    阅读次数:120
word2vec中 distence.c 文件源码分析
#include #include #include //#include #include const long long max_size = 2000; // max length of strings const long long N = 5;...
分类:其他好文   时间:2015-04-09 22:01:15    阅读次数:208
将矩阵中值为0的元素所在的行和列设置为0, in-place O(1)space O(mn) time
将矩阵中值为0的元素所在的行和列设置为0, in-place O(1)space O(mn) time 使用O(m+n)space 的方案比较容易想到...
分类:其他好文   时间:2015-04-09 22:00:53    阅读次数:128
poj3468(线段树-区间修改)
模板题: #include #include #define ll long long const int N = 100000 + 10; ll sum[N << 2]; ll addv[N << 2]; int num[N]; int n,q; void pushUp(int u) { sum[u] = sum[u * 2] + sum[u * 2 + 1]; } void b...
分类:其他好文   时间:2015-04-09 22:01:54    阅读次数:140
CentOS7修改主机名小结
CentOS7修改主机名小结 CentOS7下修改主机名 第一种:hostname 主机名 这种方式,只能修改临时的主机名,当重启机器后,主机名称又变回来了。 第二种:hostnamectl set-hostname 使用这种方式修改,可以永久性的修改主机名称!...
分类:其他好文   时间:2015-04-09 22:03:01    阅读次数:139
Tiny Web服务器代码分析
Tiny Web服务器代码分析 《深入理解计算机系统》中开发了一个小但是功能齐全的称为Tiny的web服务器,这里是Tiny服务器的源码解析。 1.Tiny的main程序   Tiny是一个迭代服务器,通过命令行中传递来的端口值,调用Open_listenfd()函数打开一个监听套接字,然后Tiny执行无限循环:服务器阻塞在accept,等待监听描述符listenfd上的连接请求,当服务器从a...
分类:Web程序   时间:2015-04-09 22:00:55    阅读次数:211
LightOJ1314---Names for Babies
1314 - Names for Babies PDF (English) Statistics Forum Time Limit: 4 second(s) Memory Limit: 32 MBLong time ago, there was a strange kingdom. Peoples of different religions, different cult...
分类:其他好文   时间:2015-04-09 22:01:05    阅读次数:194
android studio 启动问题
1.在网上下载sdk 安装。 2  安装完成,后点击finish 后启动,结果,你妹: 启动不了 3 查看 android-studio\bin下的studio.bat 居然是  No jdk find。 解决方案: 发现JDK、JRE安装目录存在空格,比如C:\Program Files\Java\jdk1.7.0_15,其中Program Files中包含空格 重新修...
分类:移动开发   时间:2015-04-09 22:00:23    阅读次数:176
基于人工分析的HTTP-POST请求报文特征获取一般方法
现有的HTTP-POST请求信息还原工具都是基于特征(包括网络应用的行为识别特征与信息提取特征)的,而特征的获取往往依赖于人工分析。本文以分析百度贴吧客户端的发帖为例,说明这种基于人工分析获取HTTP-POST请求报文特征的一般流程。...
分类:Web程序   时间:2015-04-09 21:59:44    阅读次数:252
关于xceptionUtils.getStackTrace(e)的疑问
看到生产上的代码片段: try { Thread.sleep(10); XXXX } catch (InterruptedException e) { LogCore.core.error(ExceptionUtils.getStackTrace(e)); } 心生疑窦: 为什么不直接用 try { Thread.sleep(10);...
分类:其他好文   时间:2015-04-09 21:59:11    阅读次数:660
【NOI2007】【BZOJ1492】货币兑换Cash
BZOJ题面是图片来的. 文字版题面 1797 货币兑换2007年NOI全国竞赛 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 大师 Master题目描述 Description小 Y 最近在一家金券交易所工作。该金券交易所只发行交易两种金券:A 纪 念券(以下简称 A 券)和 B 纪念券(以下简称 B 券)。每个持有金券的顾客都有 一个自己的帐户。金券的数目可以...
分类:其他好文   时间:2015-04-09 22:01:40    阅读次数:243
2381条   上一页 1 ... 13 14 15 16 17 18 19 ... 141 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!