自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

vickey

岁月静和,微笑向暖

  • 博客(136)
  • 收藏
  • 关注

原创 python 网络编程 openurl [errno 10060]

《python 基础教程 第二版》 学习网络编程, 按照书本介绍,只是读取网页数据,简明的做法,但尝试失败错误提示:[Errno socket error] [errno 10060]导致错误原因:1.url 方 限制了访问次数,防止过快2.自己的网络有问题。      1)断网情况     2)使用的网络访问外网受限     解决方法,改用更高级点的

2016-04-06 16:27:48 10088 1

原创 python 异常 try-except句型

1.句型try:     表达式 1(如果表达式,可以成功执行,则执行,跳到 finally 语句)except ExpectErrorType, Argument:   (表达式1 没有做成功,且正好是 ExpectErrorType 的错误情况,则执行)     表达式2 (如何处理这种异常情况)else:  (try succ && 上

2016-04-06 15:30:14 34224

原创 vector pair sort

bool strict_weak_ordering(const std::pair a, const std::pair b) { return a.first < b.first; } int main() {   using namespace std;   vect

2016-01-15 21:20:42 853

原创 文件权限问题 unix

查看权限语句:ls –l xxfile权限位数:10位:类型[1位] user(属主)[3位]  group[3位]  other[3位]权限字符意义:r/4:readw/2:writex/1:可被执行-/0:相应位未被授予          -rw------- (600) 只有所有者才有读和

2016-01-12 11:33:52 679

原创 secureCRT

点击打开原文

2016-01-07 15:28:25 450

原创 虚拟继承

1.为什么要引入虚拟继承虚拟继承是多重继承中特有的概念。虚拟基类是为解决多重继承而出现的。如:类D继承自类B1、B2,而类B1、B2都继承自类A,因此在类D中两次出现类A中的变量和函数。为了节省内存空间,可以将B1、B2对A的继承定义为虚拟继承,而A就成了虚拟基类。实现的代码如下:class Aclass B1:public virtual A;class B2:p

2016-01-06 21:22:30 365

转载 Endian

在各种计算机体系结构中,对于字节、字等的存储机制有所不同,因而引发了计算机通信领 域中一个很重要的问题,即通信双方交流的信息单元(比特、字节、字、双字等等)应该以什么样的顺序进行传送。如果不达成一致的规则,通信双方将无法进行正 确的编/译码从而导致通信失败。目前在各种体系的计算机中通常采用的字节存储机制主要有两种:Big-Endian和Little-Endian,下面先 从字节序说起。 

2016-01-06 11:54:51 678

转载 android TextView 属性

android:cursorVisible设定光标为显示/隐藏,默认显示。android:digits设置允许输入哪些字符。如“1234567890.+-*/% ()”android:drawableBottom在text的下方输出一个drawable,如图片。如果指定一个颜色的话会text的背景设为该颜色,并且同时和background使用时覆盖后者。android:drawable

2015-11-07 19:52:18 428

转载 Android Studio 学习笔记

常用功能在Studio菜单栏的右边有这样几个常用的功能,如图分别是 Gradle同步、AVD Manager、SDK Manager、DDMSGradle同步 在你项目运行或者更改Gradle配置的时候都要点击下这个按钮,会下载相应的依赖AVD Manager 模拟器管理SDK Manager 就是管理你的SDK版本DDMS 即 Dalvik Debug Monitor S

2015-11-04 15:49:06 340

转载 python 中文编码问题

转载http://my.oschina.net/leejun2005/blog/74430总结:1)前缀“u”表示“后面这个字符串“是一个Unicode字符串”,这仅仅是一个声明,并不表示这个字符串就真的是Unicode了;就好比某正太声称自己已满18岁,但实际上他的真实年龄并不确定,现在体育界年龄造假可不稀罕幺! 那么声明成u有什么作用呢?对于Python来说,只要你

2015-08-31 17:04:52 415

转载 C语言各种数据类型在系统中占的字节和取值范围

C语言各种数据类型在系统中占的字节和取值范围基本类型包括字节型(char)、整型(int)和浮点型(float/double)。定义基本类型变量时,可以使用符号属性signed、unsigned(对于char、int),和长度属性short、long(对于int、double)对变量的取值区间和精度进行说明。  下面列举了Dev-C++下基本类型所占位数和取值范围:

2015-08-26 17:38:23 1089

原创 unix ls 命令

ls 命令选项详解        ls 命令可以说是Linux下最常用的命令之一。它有众多的选项,其中有很多是很有用的,你是否熟悉呢?下面列出了 ls 命令的绝大多数选项。 -a 列出目录下的所有文件,包括以 . 开头的隐含文件。 -b 把文件名中不可输出的字符用反斜杠加字符编号(就象在C语言里一样)的形式列出。 -c 输出文件的 i 节点的修改时间,并以此排序。 -d

2015-08-18 21:02:08 3616

转载 计算二进制的1的个数

转载 http://www.cnblogs.com/graphics/archive/2010/06/21/1752421.html点击打开链接very good!

2015-03-17 21:13:52 423

转载 操作系统 IPC

转载:http://blog.chinaunix.net/uid-26833883-id-3230564.html一、IPC(Inter-Process Communication,进程间通信)对象的介绍System V 的IPC对象有共享内存、消息队列、信号灯。注意:在IPC的通信模式下,不管是使用消息队列还是共享内存,甚至是信号灯,每个IPC的对象都有唯

2015-03-16 11:12:40 2090

原创 街区最短路径问题 规律题

街区最短路径问题原题链接: 点击打开链接时间限制:3000 ms  |  内存限制:65535 KB难度:4描述 一个街区有很多住户,街区的街道只能为东西、南北两种方向。住户只可以沿着街道行走。各个街道之间的间隔相等。用(x,y)来表示住户坐在的街区。例如(4,20),表示用户在东西方向第4个街道,南北方向第20个街道。现在要建一

2015-02-01 09:58:28 818

原创 hdu 5164 Matching on Array AC自动机

Matching on ArrayTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 257    Accepted Submission(s): 61Problem DescriptionAlice has a seq

2015-01-27 19:32:05 616

原创 hdu 3389 Game 博弈

GameTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 398    Accepted Submission(s): 263Problem DescriptionBob and Alice are playing a

2014-12-01 20:57:38 535

原创 hdu 5115 Dire Wolf 区间DP

Dire WolfTime Limit: 5000/5000 MS (Java/Others)    Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 86    Accepted Submission(s): 50Problem DescriptionDire wolves, also know

2014-11-30 14:41:56 483

原创 hdu 2149 Public Sale 基础博弈

Public SaleTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4545    Accepted Submission(s): 2748Problem Description虽然不想,但是现实总归是现实,Lel

2014-11-21 17:24:41 407

原创 hdu 2147 kiki's game 博弈基础题

kiki's gameTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 40000/1000 K (Java/Others)Total Submission(s): 6963    Accepted Submission(s): 4165Problem DescriptionRecently kiki has n

2014-11-21 16:26:00 443

原创 Sweet Child Makes Trouble 错排

Sweet Child Makes TroubleInput: standard inputOutput: standard outputTime Limit: 8 secondsChildren are always sweet but they can sometimes make you feel bitter. In this problem, you will see h

2014-11-18 20:16:44 995

原创 Tmutarakan Exams 简单的容斥定理

Tmutarakan ExamsTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionUniversity of New Tmutarakan trains the first-class s

2014-11-17 23:04:54 583

原创 poj 2356 Find a multiple 抽屉原理

Find a multipleTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6263 Accepted: 2734 Special JudgeDescriptionThe input contains N natural (i.e. positive

2014-11-17 16:08:07 470

原创 炮兵阵地 压缩DP

炮兵阵地时间限制:2000 ms  |  内存限制:65535 KB难度:6描述 司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:

2014-11-17 15:07:33 414

原创 B. Appleman and Tree 树状DP

B. Appleman and Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAppleman has a tree with n vertices. Some of the

2014-10-30 23:48:58 623

原创 hdu5037 Frog 贪心

FrogTime Limit: 3000/1500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 754    Accepted Submission(s): 185Problem DescriptionOnce upon a time, there i

2014-09-22 20:23:25 912

原创 hdu 4266 The Worm in the Apple 三维凸包

The Worm in the AppleTime Limit: 50000/20000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 540    Accepted Submission(s): 248Problem DescriptionWilly th

2014-09-20 17:42:45 649

原创 hdu 4939 Stupid Tower Defense DP

Stupid Tower DefenseTime Limit: 12000/6000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1181    Accepted Submission(s): 346Problem DescriptionFSF is

2014-08-13 23:06:30 449

原创 hdu 4937 Lucky Number 数学

Lucky NumberTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 229    Accepted Submission(s): 61Problem Description“Ladies and Gentle

2014-08-12 19:58:50 544

原创 URAL 1109 简单二分图匹配

题意: A,B俩个国家分别有 n, m 个代表,lia'g

2014-08-10 17:03:42 455

原创 CF problem-56-E. Domino Principle 维护栈

E. Domino Principletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya is interested in arranging dominoes. He is

2014-08-10 13:57:09 687

原创 HDU 2289 Cup 二分

CupTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4292    Accepted Submission(s): 1351Problem DescriptionThe WHU ACM Team has a big

2014-08-10 13:46:47 437

原创 poj 1182 食物链 并查集

我勒个去呀,昨天写了俩个遍都是w

2014-08-08 17:27:28 347

原创 hdu 4923 Room and Moor

#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;const double eps=1e-9;int n;int a[100010];struct node{ int cnt; int a

2014-08-07 23:37:57 408

原创 hdu 4912 Paths on the tree LCA + 贪心

题意:给一棵树,有m 条paths,

2014-08-06 17:59:40 605

原创 hdu 2586 How far away ? LCA 最近公共祖先

题意: 给T组测试,每组n 个点,m 条

2014-08-06 15:35:35 450

原创 poj 3276 Face The Right Way

题意: 一序列,N 个数:前0 后1,每次可以tong'sh

2014-08-05 16:48:42 370

原创 poj 3320 Jessica's Reading Problem

题意:求最少复习天数 &

2014-08-05 00:25:52 393

原创 CF A. Trains

outputstandard outputVasya the programmer lives in the middle of the Programming subway branch. He has two girlfriends: Dasha and Masha, who live at the different ends of the branch, each one

2014-08-04 23:56:57 562

原创 UVA 11489 搜索

#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;char a[1010];int v[1010];bool vis[1010];int len,sum;int de

2014-08-04 23:54:38 375

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除