源链接还在自己买彩票吗,有个现成的:GNU shuf命令。shuf -i 1-36 -n 12 | xargs -n 6这样就会产生两组彩票(1~36个数字任选)当然还可以派其他用途,比如:1 shuf -e clubs hearts diamonds spades2 3 might output:...
分类:
其他好文 时间:
2014-07-12 09:07:30
阅读次数:
213
UVA 10548 - Find the Right Changes
题目链接
题意:给定a,b,c,表示货物的价值,求由A货物和B货物组成C货物有几种方法,判断有无解和是否有无限多种
思路:扩展欧几里得求通解,去计算上限和下限就能判断
代码:
#include
#include
#include
#include
using namespace std;
...
分类:
其他好文 时间:
2014-07-11 00:22:22
阅读次数:
419
题目描述:
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
For example,
Given:
s1 = "aabcc",
s2 = "dbbca",
When s3 = "aadbbcbcac", return
true.
When s3 = "aad...
分类:
其他好文 时间:
2014-07-10 21:15:16
阅读次数:
166
Dungeon Master
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 16005
Accepted: 6208
Description
You are trapped in a 3D dungeon and need to find the quic...
分类:
其他好文 时间:
2014-07-10 20:44:15
阅读次数:
191
1、进程创建:fork函数族
fork()和vfork()函数的区别:
(1) fork ( ):子进程拷贝父进程的数据段,代码段
vfork( ):子进程与父进程共享数据段
(2) fork( )父子进程的执行次序不确定
vfork 保证子进程先运行,在调用exec 或exit 之前与父进程数据是共享的,在它调用...
分类:
其他好文 时间:
2014-07-10 20:04:04
阅读次数:
178
题目:hdu4847:Wow! Such Doge!
题目大意:在给出的段落里面找出“doge”大小写都可以。
解题思路:字符串匹配问题,可以在之前将字母都转换成统一格式。
代码:
#include
#include
const int N = 1e6;
char str[N];
const char *s1 = "doge";
int find () {
i...
分类:
其他好文 时间:
2014-07-10 19:32:46
阅读次数:
224
http://www.cnblogs.com/twinsclover/archive/2012/04/26/2471704.html用python的BeautifulSoup分析htmlhttp://www.crummy.com/software/BeautifulSoup/bs3/documentation.zh.htmlBeautifulSoup中文文档1)搜索tag:find(tagname)#直接搜索名为tagname的tag如:find(‘head‘)find..
分类:
编程语言 时间:
2014-07-10 19:12:38
阅读次数:
265
echo-n"欢迎购买福彩双色球,按任意键机选一注"get_char(){SAVEDSTTY=`stty-g`stty-echosttyrawddif=/dev/ttybs=1count=12>/dev/nullstty-rawsttyechostty$SAVEDSTTY}char=`get_char`echo-ne"\033[1;31m红球:$(seq32|xargs)\n\033[0m"red=($(seq32))echo-e"\033[1;34m蓝球:$..
分类:
其他好文 时间:
2014-07-10 18:09:44
阅读次数:
198
提示bind()错误=10048原因:其他程序占用飞鸽的2425端口比如:飞秋也是使用2425端口解决:用netstat命令查看是哪个进程占用了该端口格式:netstat-ano|find"2425"结果:UDP0.0.0.0:2425*:*1716最后的1716就是占用2425进程的进程ID,看看是什么,可以结束的直接结束该进程,再打..
分类:
其他好文 时间:
2014-07-10 18:08:23
阅读次数:
332
发生这种错误的原因是什么呢,正常情况下都是你的系统中装了两个版本的JDK,比如装了1个1.6版本的JDK,然后再安装1个1.7版本的JDK,这个时候你打开eclipse的时候就会弹出一个对话框,提示:Error:could not find java SE Runtime Environment。
这个时候你也可以在命令行中输入”java -version“,可以看到相关的错误提示:
...
分类:
编程语言 时间:
2014-07-10 17:40:32
阅读次数:
263