每一次比赛的时候脑子都卡顿,
这次更离谱,我竟然二进制枚举边,这么大的复杂度,并且剪不了枝
后来学长说着是道爆搜,搜每一条边,恍然大悟。
只需要剪掉点的度数是奇数的时候,或者他的线上朋友或线下朋友大于等于度数的1/2时候的枝,
跑了15ms#include
#include
#include
using namespace std...
分类:
其他好文 时间:
2015-07-24 14:23:23
阅读次数:
96
1、创建项目
2、添加target watchApp
3、调试
4、解决bug
5、 搭建界面
6、链接button点击事件
7 、iphoneApp与watchApp交互...
分类:
其他好文 时间:
2015-07-24 14:22:02
阅读次数:
108
画板乐效果图页面代码public class ActionerView extends View {
private Paint mPaint = new Paint();
private Path mPath = new Path();//手指滑动路径
private Canvas mCanvas;//缓存画布
private Bitmap mBitmap;//缓存...
分类:
其他好文 时间:
2015-07-24 14:20:45
阅读次数:
163
Rebuilding Roads
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 9957
Accepted: 4537
Description
The cows have reconstructed Farmer John's farm, with its N...
分类:
其他好文 时间:
2015-07-24 14:20:58
阅读次数:
103
qt QLineEdit 左侧带自定义图标类, 分享给大家....
分类:
其他好文 时间:
2015-07-24 14:23:10
阅读次数:
279
Optimal Array Multiplication Sequence
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu
Submit Status Practice UVA 348
Appoint description:Description
Download as PDFGiven two...
分类:
其他好文 时间:
2015-07-24 14:20:13
阅读次数:
89
CD
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu
Submit Status Practice UVA 624
Appoint description:Description
Download as PDFYou have a long drive by car ahead. You have...
分类:
其他好文 时间:
2015-07-24 14:22:05
阅读次数:
87
SYN攻击的应对措施
针对SYN攻击的几个环节,提出相应的处理方法:
方式1:减少SYN-ACK数据包的重发次数(默认是5次):
sysctl -w net.ipv4.tcp_synack_retries=3
sysctl -w net.ipv4.tcp_syn_retries=3
方式2:使用SYN Cookie技术:
sysctl -w net.ipv4.tcp_syn...
分类:
其他好文 时间:
2015-07-24 14:21:06
阅读次数:
159
选择器:是一种变量的类型,用于存储方法,类似于C语言的函数指针
作用:用于UI控件的点击事件
新建一个Dog的类
在Dog.m中写两个方法
#import "Dog.h"
@implementation Dog
- (void)bark{
NSLog(@"狗在叫");
}
- (void)barkToPeople:(NSString *)name{...
分类:
其他好文 时间:
2015-07-24 14:20:44
阅读次数:
106
LUCIFER - LUCIFER Number
no tags
Lucifer is the only human whi has defeated RA-ONE in a computer game ..
RA-One is after lucifer for revenge and G-One is there to protect him ...
All th...
分类:
其他好文 时间:
2015-07-24 14:19:59
阅读次数:
117
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=5308
题面:
I Wanna Become A 24-Point Master
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submis...
分类:
其他好文 时间:
2015-07-24 14:21:41
阅读次数:
139
用 Arduino Uno 给 Arduino Mini(Pro)烧录程序准备
Arduino Uno
Arduino Mini(Pro)
杜邦线若干
接线
首先去掉 Arduino 上的芯片ATMEGA328P
接线Uno —– Mini
0(RX) – 0(RX)
1(TX) – 1(TX)
VCC —- VCC
GND —- GND
RESET – RST
刷入程序将 Arduino...
分类:
其他好文 时间:
2015-07-24 14:18:40
阅读次数:
113
正则式太难学,而且容易忘记 ,西西是看过很多次,都是一会就全部不记得了滴。很多不太懂正则的朋友,在遇到需要用正则校验数据时,往往是在网上去找很久,结果找来的还是不很符合要求。所以我最近把开发中常用的一些正则表达式整理了一下,在这里分享一下。给自己留个底,也给朋友们做个参考。
一、校验数字的表达式
1 数字:^[0-9]*$
2 n位的数字:^\d{n}$
3 至少n位的数字:^\d{n,...
分类:
其他好文 时间:
2015-07-24 14:20:41
阅读次数:
119
参考自http://geuz.org/gmsh/doc/texinfo/gmsh.html#MSH-binary-file-format
$MeshFormat
version-number file-type data-size
$EndMeshFormat
$PhysicalNames
number-of-names
physical-dimension physical-number ...
分类:
其他好文 时间:
2015-07-24 14:18:30
阅读次数:
173
RAONE - Ra-One Numbers
no tags
In the War between good and evil . Ra-One is on the evil side and G-One on the good side.
Ra-One is fond of destroying cities and its G-one's duty to prote...
分类:
其他好文 时间:
2015-07-24 14:18:59
阅读次数:
456