码迷,mamicode.com
首页 > 其他好文
ext2文件系统寻址
ext2 文件系统相关介绍:ext2文件系统,一个文件除了数据需要存储之外,一些描述信息也需要存储,例如文件类型(常规、目录、符号链接等),权限,文件大小,创建/修改/访问时间等,也就是ls -l命令看到的那些信息,这些信息存在inode中而不是数据块中。但是文件名存在哪里,首先文件名不是存在inode中的,那么文件名存在哪里? 这里我们可以看到目录大小都为4096,当你创建一个目录的时候操...
分类:其他好文   时间:2015-04-10 22:33:05    阅读次数:365
Topcoder SRM 654 Div2 1000
Problem 给一个长度为N(N∈[1,2000])N(N\in[1,2000])的数列An(An∈[?100,100])A_n(An\in[-100,100]),设ans=A1?A2?...?Anans=A_1-A_2-...-A_n,下面进行M(M∈[1,2000])M(M\in[1,2000])次操作,每次将AA的p[i]p[i]的值修改为v[i]v[i],即A[p[i]]=v[i]A[...
分类:其他好文   时间:2015-04-10 22:30:15    阅读次数:228
POJ 3663 Costume Party (二分查找)
Costume Party Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12297   Accepted: 4891 Description It's Halloween! Farmer John is taking the cows to a costume ...
分类:其他好文   时间:2015-04-10 22:30:22    阅读次数:117
USACO--3.1Humble Numbers
这个题的难点在于如何顺序的产生Humble Numbers。考虑我们已经得到前k个Humble Numbers,如果得到第k+1个Humble Numbers?对每个素数,在前k个Humble Numbers中选择一个数与其相乘的结果恰好大于第k个Humble Numbers,然后我们的第k+1个数就是这些结果中的最小值。当然如果对每个素数每次都要遍历一遍前k个Humble Numbers,肯定会超...
分类:其他好文   时间:2015-04-10 22:32:40    阅读次数:238
POJ 3664 Election Time
Election Time Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7845   Accepted: 4176 Description The cows are having their first election after overthrowing t...
分类:其他好文   时间:2015-04-10 22:32:12    阅读次数:145
【核心基础】虚函数
本节研究虚函数的相关问题;...
分类:其他好文   时间:2015-04-10 22:31:12    阅读次数:158
POJ 2503 Babelfish(字典树)
Babelfish Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 35009   Accepted: 14979 Description You have just moved from Waterloo to a big city. The people her...
分类:其他好文   时间:2015-04-10 22:30:18    阅读次数:173
HDU 1228 A + B (水题)
A + B Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13260 Accepted Submission(s): 7797 Problem Description 读入两个小于100的正整数A和B,计算A+B. 需要注意...
分类:其他好文   时间:2015-04-10 22:30:29    阅读次数:126
leetcode-13 Roman to Integer
?? 问题描述:Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to3999. 问题分析:{'M','D','C','L','X','V','I'};分别对应{1000, 500, 100, 50, 10, 5, 1}; 当出...
分类:其他好文   时间:2015-04-10 22:30:55    阅读次数:142
hdu 1240 Asteroids!
不开心,简单的三维bfs #include #include using namespace std; string str1,str2; int n; int sx,sy,sz,ex,ey,ez; char mapp[11][11][11]; int dir[6][3]={{0,0,1},{0,0,-1},{1,0,0},{-1,0,0},{0,1,0},{0,-1,0}}; int re...
分类:其他好文   时间:2015-04-10 22:27:57    阅读次数:133
猫猫整理问题之:copy,对象自定义copy
猫猫分享,必须精品 原文地址:http://blog.csdn.net/u013357243?viewmode=contentscopycopy的正目的copy 目的:建立一个副本,彼此修改,各不干扰 Copy(不可变)和MutableCopy(可变)针对Foundation框架的数据类型。 对于自定义类,copy就是可变的。可变数组的copy这里用NSMutableArray为例子。// 可...
分类:其他好文   时间:2015-04-10 22:27:36    阅读次数:172
第11题:求二叉树中节点的最大距离
欢迎转载,转载请务必注明出处:http://blog.csdn.net/alading2009/article/details/44984331 第11题:如果我们把二叉树看成一个图,父子节点之间的连线看成是双向的,我们姑且定义“距离”为两点之间边的个数。写一个程序,求一棵二叉树中相距最远的两个节点之间的距离。 树的高度是一个重要信息,然后就可以祭出递归大法了。 代码 pac...
分类:其他好文   时间:2015-04-10 22:27:43    阅读次数:161
ZOJ3471 状态压缩DP
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3471 Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When t...
分类:其他好文   时间:2015-04-10 22:29:11    阅读次数:149
浅谈设计模式:迭代器模式(Iterator Pattern)
官方解释:to access the elements of an aggregate object sequentially without exposing its underlying implementation. 顺序地访问集合对象的元素并且不暴露它的内部实现 假设给定一个集合对象,定义一个与之相关联的Iterator(迭代器),该迭代器能够访问集合对象的内部元素,通过迭代的方法能够按照顺序依次访...
分类:其他好文   时间:2015-04-10 22:26:50    阅读次数:201
[转]不能将参数1从“const char []”转换为“LPCTSTR
今天在使用vs2008+MFC时候,使用editControl的replacesel(“”)发生报错。如下::不能将参数1从“const char []”转换为“LPCTSTR”其解决方案就是, 在项目属性里面找到项目默认值下面的字符集, 将其换为:使用多字节字符集就ok了。原因:typedefLP...
分类:其他好文   时间:2015-04-10 22:26:42    阅读次数:119
Codeforces Round #236 (Div. 2)E. Strictly Positive Matrix(402E)
E. Strictly Positive MatrixYou have matrixaof sizen?×?n. Let's number the rows of the matrix from1tonfrom top to bottom, let...
分类:其他好文   时间:2015-04-10 22:25:42    阅读次数:209
Maven安装、集成
安装Maven 1、在安装Maven前,确保jdk版本在1.6及以上,并配置好jdk环境变量。 2、下载Maven:http://maven.apache.org/download.html 下载apache-maven-3.3.1.zip解压至F:\Work\Maven\apache-mave.....
分类:其他好文   时间:2015-04-10 22:26:11    阅读次数:159
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!