解题报告
题目传送门
题意:
在h×w的矩阵中,o表示空地,*表示城市,无线设备只能装在城市上,要使城市全都覆盖需要多少设备。每个设备只能覆盖相邻的两个设备。
思路:
感觉是直接的最大匹配,求出两两匹配的最大数,加上没有匹配的城市就是要的答案。
网上看了题解,正解是最小路径覆盖。
最小路径覆盖=|G|-最大匹配数
在一个N*N的有向图中,路径覆盖就是在图中找一些路经,使之覆盖了...
分类:
其他 时间:
2014-08-16 12:38:50
收藏:
0 评论:
0 赞:
0 阅读:
200
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
收藏:
0 评论:
0 赞:
0 阅读:
279
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
收藏:
0 评论:
0 赞:
0 阅读:
301
变量说明:
$$
Shell本身的PID(ProcessID)
$!
Shell最后运行的后台Process的PID
$?
最后运行的命令的结束代码(返回值)
$-
使用Set命令设定的Flag一览
$*
所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出所有参数。
$@
所有参数列表。如"$@"用「"」括起来的情况、以"$1" "$2" …...
分类:
其他 时间:
2014-08-16 12:38:10
收藏:
0 评论:
0 赞:
0 阅读:
321
自我学习就是稀疏编码器串联一个Softmax分类器,上一节看到,训练400次,准确率为98.2%
在此基础上,我们可以搭建我们的第一个深度网络:栈式自编码(2层)+Softmax分类器
简单地说,我们把稀疏自编码器的输出作为更高一层稀疏自编码器的输入。
和自我学习很像,似乎就是新加了一层,但是其实不然:
新技巧在于,我们这里有个微调的过程,让残差从最高层向输入层传递,微调整个网络权重...
分类:
其他 时间:
2014-08-16 12:37:40
收藏:
0 评论:
0 赞:
0 阅读:
458
1、datetimepicker--自定义格式
按理说,datetimepicker的格式由customformat来决定就是了,但是仅仅修改customformat属性是不够的。
附上一段datetimepicker的designer.cs...
分类:
其他 时间:
2014-08-16 12:37:30
收藏:
0 评论:
0 赞:
0 阅读:
334
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
收藏:
0 评论:
0 赞:
0 阅读:
351
实体,实体集,Datatable三者的比较,用好了,灵活性一定会得到很大的提高...
分类:
其他 时间:
2014-08-16 12:37:00
收藏:
0 评论:
0 赞:
0 阅读:
524
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
收藏:
0 评论:
0 赞:
0 阅读:
397
思路:先按交叉相乘之差排序好了计算就行了。
#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
收藏:
0 评论:
0 赞:
0 阅读:
290
objective-c基本语法 中深复制,浅复制...
分类:
其他 时间:
2014-08-16 12:36:20
收藏:
0 评论:
0 赞:
0 阅读:
346
git是代码管理的常用工具,创建远程仓库也是程序员相互协作的基本技能之一。所以掌握这项基本操作是十分必要的。...
分类:
其他 时间:
2014-08-16 12:36:10
收藏:
0 评论:
0 赞:
0 阅读:
302
基于短消息的远程家电红外遥控系统
通过远程广域网控制家电设备是信息家电的主要发展方向之一。由于价格低廉、覆盖面广、使用方便等原因,短消息平台已经成为远程家电控制的重要方法。 本文研究和开发了一种基于短消息的远程红外遥控系统。该系统以Java语言应用程序作为客户控制终端,以短消息作为控制信号的传输平台,以家电常用的红外遥控器作为控制设备,形成了比较完备的远程家电控制系统原型。 本文首先分析了广域网...
分类:
其他 时间:
2014-08-16 12:36:00
收藏:
0 评论:
0 赞:
0 阅读:
444
//虽然现在在多线程方面大多都在用GCD,当其他方式我们还是应该有所了解,给大家介绍一下NSThread和NSInvocationOperation的简单用法
@interface
yxpViewController ()
{
UIImageView *_imageView;
//声明一个队列
NSOperationQue...
分类:
移动平台 时间:
2014-08-16 12:35:50
收藏:
0 评论:
0 赞:
0 阅读:
384
map是STL中的标准关系容器,它存储的元素时pair,拥有键值key和实值value。按照键值key存储到红黑树中,用红黑树提供的函数操作map。...
分类:
其他 时间:
2014-08-16 12:35:40
收藏:
0 评论:
0 赞:
0 阅读:
283
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
收藏:
0 评论:
0 赞:
0 阅读:
248
#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
收藏:
0 评论:
0 赞:
0 阅读:
437
在android开发过程中关于EditText在setFocusable(false);后,当需要再次获得焦点输入时设置setFocusable(true);后还是无法获得焦点的问题:...
分类:
移动平台 时间:
2014-08-16 12:35:10
收藏:
0 评论:
0 赞:
0 阅读:
437
某种字符串处理语言允许程序员将一个字符串拆分为两段。由于此操作需要复制字符串,因此要花费n个时间单位来将一个n个字符的字符串拆为两段。假定一个程序员希望将一个字符串拆分为多段,拆分的顺序会影响所花费的总时间。例如,假定这个程序员希望将一个20个字符的字符串在第2个,第8个以及第10个字符后进行拆分(字符由左至右,从1开始升序编号)。如果她按由左到右顺序进行拆分,则第一次拆分花费20个时间单位,第二...
分类:
其他 时间:
2014-08-16 12:35:00
收藏:
0 评论:
0 赞:
0 阅读:
493
组队赛解题报告:
CUGBACM_Summer_Tranning 5:组队赛第五场
CUGBACM_Summer_Tranning 4:
CUGBACM_Summer_Tranning 3:组队赛第三场
CUGBACM_Summer_Tranning 2:组队赛第二场
CUGBACM_Summer_Tranning 1:组队赛第一场...
分类:
其他 时间:
2014-08-16 12:34:50
收藏:
0 评论:
0 赞:
0 阅读:
363