- 博客(30)
- 资源 (2)
- 收藏
- 关注
原创 并发、并行、异步、同步、单进程、多进程、多线程...
单进程:一个时间段只能执行一个进程,例如,要听歌就写不了文档多进程:一个时间段能同时执行多个进程,例如,终于能同时听歌写文档了多线程:让一个进程能同时执行一段代码的技术,用起来感觉类似于多进程,但区别在于线程与线程间共享资源,所以比多进程节省了系统资源,例如,一个浏览器可以同时打开两个网页。并发:一个“时间段”有多个程序同时执行,多线程并发和多进程并发应该都算并发,你可以说多进程和多线
2015-12-30 11:47:36 3607
原创 细说六度分隔与相关数学模型
1. 什么是六度分隔理论。更好的说法应该叫小世界理论,即假设世界上所有互不相识的人只需要很少的中间人就能够建立起联系的理论。也就是说任何两位素不相识的人之间,通过一定的联系方式,总能够产生必然联系或关系。通过对小世界理论的深入研究,科学家提出了诸多模型,并从中挖掘出非常多的价值(具体应用见3)。 “Six degrees ofseparation”这个词最早是在1929年,匈牙利作家
2015-12-24 17:08:47 3903
原创 重装和重装后该怎么办(通用版)
本教程适合重装windows操作系统。只要你的电脑没坏就能重装,和硬盘里的具体情况无关。准备:8g以上u盘一枚(要格式化)系统安装盘iso文件一个winPE安装盘iso文件一个UltraISO程序一个以上程序下载地址:系统安装盘iso(用迅雷下):win10 64位:ed2k://|file|cn_windows_10_multiple_editions_x64
2015-10-10 15:43:50 564
原创 c++ 二维数组名为何取值后与原地址相同
int j[2][3];j和*j的值是一样的!j是一个int*[3]类型的指针,指向的是一个长度为3的int型数组,其值为该数组的首元素的地址,通过该值与本指针的类型便可找到该数组*j即对j取值,得到的是一个长度为3的int型数组,数组的值为数组首元素的地址,这点是毋庸置疑的所以j和*j的值相同,但其实指向的块大小不一样,而且对int*[3]类型的指针取值得到的是该数组首元素的地址
2015-06-02 21:24:35 714
原创 白话Prim
需要有一个保存节点到当前集合的最短距离的数组,不连通的为max在搜索的循环内1.循环所有点,找出与当前集合距离最短的点,设置当前点为该点,设置该点访问过2.循环所有点,将未访问过的点与当前最短距离和新点的最短距离比较,更新数组代码:int prim(int n){ initialize(visit,false,n); int low[POINTNUM];//当前集
2015-01-10 00:22:19 317
原创 白话KMP算法
当初脑袋一热就把KMP写出来了,现在期末复习脑子冷静不下来,大半天没看懂KMP在说啥。好吧,总算花了一个钟看懂KMP了,赶紧记下来别以后又想不去来了。KMP是通过一个next数组来辅助匹配的。next数组里面保存的是每个数它是跟在从0开始的哪个子串的后面。find的时候一旦发生不匹配就调到子串next的位置从而减少查找时间。详情可看数据结构课本81页自己
2015-01-09 12:41:18 531
原创 用C#把批处理文件改为windows系统服务(简单的C#编写系统服务教程)
首先我个人从没学过c#和net,只学过一点c++,所以这个教程是完全不需要c#
2014-10-04 23:52:58 1383
原创 64位ubuntu 14.04安装32位dr.com客户端教程(不用安装glibc.i686 libstdc++.i686)
64位的ubuntu没32位的运行库真是令人bei
2014-10-04 10:26:37 5548 1
原创 A long stick(深度搜索)
Judge Info Memory Limit: 32768KB Case Time Limit: 10000MS Time Limit: 10000MS Judger: Number Only Judger Description There are a lot of problems about sticks. Here is one. I have
2014-08-08 21:50:41 761
原创 Checker Challenge(dfs深度搜索 打印八皇后)
Judge Info Memory Limit: 65536KB Case Time Limit: 3000MS Time Limit: 3000MS Judger: Number Only Judger Description Examine the 6x6 checkerboard below and note that the six
2014-08-08 21:45:27 369
原创 Ali and Snoopy(利用广度搜索走迷宫)
Judge Info Memory Limit: 32768KB Case Time Limit: 1000MS Time Limit: 1000MS Judger: Number Only Judger Description 阿狸被困在迷宫,Snoopy要去救他,Snoopy可以向上、下、左、右四个方向行走,每走一步(格)就要喝掉一瓶益力多。
2014-08-08 21:18:06 536
原创 Locked Boxes (并查集)
Judge Info Memory Limit: 32768KB Case Time Limit: 10000MS Time Limit: 10000MS Judger: Number Only Judger Description Poseidon has N boxes with lock. What's inside the box? (hum...,
2014-08-08 21:12:51 368
原创 Ranks Average(归并排序求逆序数)
Judge Info Memory Limit: 32768KB Case Time Limit: 5000MS Time Limit: 5000MS Judger: Number Only Judger Description We are playing a game, with the objective of accumulating as many
2014-08-08 21:00:37 495
原创 Just Sort It(快速排序)
Judge Info Memory Limit: 1124KB Case Time Limit: 10000MS Time Limit: 10000MS Judger: Number Only Judger Description Sorting is one of the most important algorithm in computer scien
2014-08-08 20:50:16 434
原创 Number of prime number(打印素数表)
Description 素数是指在大于1的自然数中,除了1和此整数自身外,没法被其他自然数整除的数,例如2, 3, 5, 7, 11…… 求n以内的素数个数,是指小于等于n的素数数量 例如n=4,因为小于4的素数是2、3,所以数量是2 Input 第一行输入一个t,表示下面将有t组测试数据。接下来的t行的每行包含参数n(0Ou
2014-08-08 20:46:26 500
转载 POJ 2951 Cake Cutting(动态规划)
Description You are given a rectangular cake of integral dimensions w × h. Your goal is to divide this cake into m rectangular pieces of integral dimensions such that the area of the largest pie
2014-08-08 20:33:57 675
原创 maxsum(dp求最大子矩阵)
Judge Info Memory Limit: 32768KB Case Time Limit: 3000MS Time Limit: 3000MS Judger: Number Only Judger Description Given a two-dimensional array of positive and negative integers,
2014-08-08 20:26:02 373
原创 Gem (多背包问题)
Judge Info Memory Limit: 32768KB Case Time Limit: 2000MS Time Limit: 2000MS Judger: Number Only Judger Description 给两个有一定容量的箱子,往里面装宝石(宝石容量不能超过箱子容量),不同的宝石有不同的容量和价值。求两个箱子里最大宝石的价值。
2014-08-08 17:36:49 1272
原创 Medicine (01多维背包)
Description Does it arouse you some painful memory when you see this topic? Don’t worry,Because we won’t let you take medicine today.As we all know, we get sick sometimes just because ou
2014-08-08 17:26:11 409
原创 Dating with Q (01背包)
Description T has being in love with Q since several years ago.Although it is really hard to maintain a long distance relationship(T and Q are not studying in the same university),T endeavors to
2014-08-08 11:37:08 388
原创 ZOJ 3785 What day is that day?(费马小定理智寻循环节)
DescriptionIt's Saturday today, what day is it after 11 + 22 + 33 + ... +NN days? InputThere are multiple test cases. The first line of input contains an integer T indicating the n
2014-08-08 11:11:27 862
原创 HDU 1757 A Simple Math Problem(矩阵快速幂)
DescriptionLele now is thinking about a simple function f(x).If x If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10);And ai(0Now, I will give a0 ~ a9 and two
2014-08-08 10:34:30 315
原创 hdu 1005 Number Sequence(智寻循环节)
DescriptionA number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n).
2014-08-08 10:12:05 398
原创 HDU 1061 Rightmost Digit (四则运算求余,快速幂)
DescriptionGiven a positive integer N, you should output the most right digit of N^N. InputThe input contains several test cases. The first line of the input is a single integer
2014-08-08 09:53:47 601
原创 hdu 2795 Billboard(线段树-剩余空间)
DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the place where all possible announcements are po
2014-08-08 09:30:02 316
原创 HDU 1394 Minimum Inversion Number(线段树求逆序数)
DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of numbers a1, a2, ..., an, if we move the
2014-08-08 09:18:56 363
原创 hdu 1166 敌兵布阵(线段树-单点更新,区间求和)
DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情
2014-08-08 09:14:33 505
原创 POJ 2513 Colored Sticks (字典树,并查集,欧拉路径组合题)
DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the e
2014-08-08 08:56:49 324
原创 HDU 1251 统计难题(字典树)
DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结
2014-08-08 08:46:21 438
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人