题目链接:http://poj.org/problem?id=1128 题目: Description Consider the following 5 picture frames placed on an 9 x 8 array. ........ ........ ........ ..... ...
分类:
编程语言 时间:
2018-02-21 10:47:37
阅读次数:
213
Discription You are given three integers k, pa and pb. You will construct a sequence with the following algorithm: Initially, start with the empty seq ...
分类:
其他好文 时间:
2018-02-20 21:18:11
阅读次数:
171
Python包含以下函数: Python包含以下方法: ...
分类:
编程语言 时间:
2018-02-20 13:23:52
阅读次数:
180
有些时候在某些服务管理脚本中看到$"$string",经过一些测试,发现引号外面的$有和没有是一样的。刚才翻了下man bash,找到了解释。 (1).如果没有特殊定制bash环境或有特殊需求,$"string"和"string"是完全等价的,使用$""只是为了保证本地化。 以下是man bash关 ...
分类:
系统相关 时间:
2018-02-19 21:11:01
阅读次数:
222
防火墙是唯一通道。 iptables是linux自带的小型的防火墙。 -A追加一个规则,来自于192.168.0.1网段的,tcp协议的22端口的,都禁止。 按照ip地址加端口加协议用的比较多。禁网卡用的少。 iptables的匹配规则: linux:如果既有配置文件又有命令参数,如果通过命令方式执 ...
分类:
系统相关 时间:
2018-02-18 10:32:57
阅读次数:
366
题意:求a串的子串与b串的子序列有多少个相匹配,mod=1e9+7; 思路:类似于LCS,如果会LCS的话就很容易(但是我没想通LCS的方程是怎么的来的) 代码: ...
分类:
其他好文 时间:
2018-02-17 14:16:26
阅读次数:
165
一 递归与二分法 一、递归调用的定义 二、递归分为两个阶段:递推,回溯 三、python中的递归效率低且没有尾递归优化 四、可以修改递归最大深度 五、 二分法 二 匿名函数 一、 什么是匿名函数? 二、有名字的函数与匿名函数的对比 三 内置函数 一 递归与二分法 一、递归调用的定义 二、递归分为两个 ...
分类:
其他好文 时间:
2018-02-15 10:28:29
阅读次数:
202
题目描述 Farmer John's NNN cows are standing in a row, as they have a tendency to do from time to time. Each cow is labeled with a distinct integer ID num ...
分类:
其他好文 时间:
2018-02-14 15:36:03
阅读次数:
173
一. 理论知识 先看一个创建Sequence的语句: SQL> create sequence seq_tmp 2 increment by 1 3 start with 1 4 nomaxvalue 5 nocycle 6 ; 序列已创建。 相关参数说明: INCREMENT BY 1 -- 每次 ...
分类:
数据库 时间:
2018-02-13 18:56:13
阅读次数:
262
批量创建10个系统账号(oldboy01-oldboy10),并设置密码(密码为随机数,要求是字符和数字的混合)创建随机密码:#echo $RANDOM | cut -c 3-9并将用户名和密码写入到一个文件,方便管理#!/bin/bash
tmpfile=/tmp/password.txt
for i in `seq 10`
do
分类:
系统相关 时间:
2018-02-13 17:52:49
阅读次数:
241