Given a binary tree, flatten it to a linked list in-place....
分类:
其他好文 时间:
2014-08-16 12:39:00
阅读次数:
136
解题报告
题目传送门
题意:
在h×w的矩阵中,o表示空地,*表示城市,无线设备只能装在城市上,要使城市全都覆盖需要多少设备。每个设备只能覆盖相邻的两个设备。
思路:
感觉是直接的最大匹配,求出两两匹配的最大数,加上没有匹配的城市就是要的答案。
网上看了题解,正解是最小路径覆盖。
最小路径覆盖=|G|-最大匹配数
在一个N*N的有向图中,路径覆盖就是在图中找一些路经,使之覆盖了...
分类:
其他好文 时间:
2014-08-16 12:38:50
阅读次数:
142
Codeforces Round #261 (Div. 2)[ABCDE]
ACM
题目地址:Codeforces Round #261 (Div. 2)
A - Pashmak and Garden
题意:
一个正方形,它的边平行于坐标轴,给出这个正方形的两个点,求出另外两个点。
分析:
判断下是否平行X轴或平行Y轴,各种if。
代码:
...
分类:
其他好文 时间:
2014-08-16 12:38:40
阅读次数:
206
HDU 4939 Stupid Tower Defense
DP 推一下。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
typedef long long LL;
using namespace std;
LL dp[1505][1505]...
分类:
其他好文 时间:
2014-08-16 12:38:20
阅读次数:
171
变量说明:
$$
Shell本身的PID(ProcessID)
$!
Shell最后运行的后台Process的PID
$?
最后运行的命令的结束代码(返回值)
$-
使用Set命令设定的Flag一览
$*
所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出所有参数。
$@
所有参数列表。如"$@"用「"」括起来的情况、以"$1" "$2" …...
分类:
其他好文 时间:
2014-08-16 12:38:10
阅读次数:
184
自我学习就是稀疏编码器串联一个Softmax分类器,上一节看到,训练400次,准确率为98.2%
在此基础上,我们可以搭建我们的第一个深度网络:栈式自编码(2层)+Softmax分类器
简单地说,我们把稀疏自编码器的输出作为更高一层稀疏自编码器的输入。
和自我学习很像,似乎就是新加了一层,但是其实不然:
新技巧在于,我们这里有个微调的过程,让残差从最高层向输入层传递,微调整个网络权重...
分类:
其他好文 时间:
2014-08-16 12:37:40
阅读次数:
220
1、datetimepicker--自定义格式
按理说,datetimepicker的格式由customformat来决定就是了,但是仅仅修改customformat属性是不够的。
附上一段datetimepicker的designer.cs...
分类:
其他好文 时间:
2014-08-16 12:37:30
阅读次数:
324
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:
其他好文 时间:
2014-08-16 12:37:20
阅读次数:
219
实体,实体集,Datatable三者的比较,用好了,灵活性一定会得到很大的提高...
分类:
其他好文 时间:
2014-08-16 12:37:00
阅读次数:
233
Description
Optimal Symmetric Paths
You have a grid of n rows and
n columns. Each of the unit squares contains a non-zero digit. You walk from the top-left square to the b...
分类:
其他好文 时间:
2014-08-16 12:36:50
阅读次数:
332
思路:先按交叉相乘之差排序好了计算就行了。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PI acos(-1.0)
#define maxn 210
#define ...
分类:
其他好文 时间:
2014-08-16 12:36:40
阅读次数:
167
objective-c基本语法 中深复制,浅复制...
分类:
其他好文 时间:
2014-08-16 12:36:20
阅读次数:
165
git是代码管理的常用工具,创建远程仓库也是程序员相互协作的基本技能之一。所以掌握这项基本操作是十分必要的。...
分类:
其他好文 时间:
2014-08-16 12:36:10
阅读次数:
166
基于短消息的远程家电红外遥控系统
通过远程广域网控制家电设备是信息家电的主要发展方向之一。由于价格低廉、覆盖面广、使用方便等原因,短消息平台已经成为远程家电控制的重要方法。 本文研究和开发了一种基于短消息的远程红外遥控系统。该系统以Java语言应用程序作为客户控制终端,以短消息作为控制信号的传输平台,以家电常用的红外遥控器作为控制设备,形成了比较完备的远程家电控制系统原型。 本文首先分析了广域网...
分类:
其他好文 时间:
2014-08-16 12:36:00
阅读次数:
343
map是STL中的标准关系容器,它存储的元素时pair,拥有键值key和实值value。按照键值key存储到红黑树中,用红黑树提供的函数操作map。...
分类:
其他好文 时间:
2014-08-16 12:35:40
阅读次数:
202
Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.
Here, we will use the integers ...
分类:
其他好文 时间:
2014-08-16 12:35:30
阅读次数:
233
#include
#include
#include
#include
#include
#include
#include
#include
#define maxn 8080
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define ALL %I64d
using namespace std;
typedef long ...
分类:
其他好文 时间:
2014-08-16 12:35:20
阅读次数:
240