码迷,mamicode.com
首页 > 其他好文
[LeetCode] Roman to Integer
Roman to Integer Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 解题思路: 罗马数字转化成数字。一种方法是映射法,每一位(阿拉伯数字)的字符到阿拉伯数字的映射。如下所示: class Solu...
分类:其他好文   时间:2015-04-18 20:40:01    阅读次数:167
HDU2833 WuKong(floyd + dp)经典
WuKong Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1429    Accepted Submission(s): 517 Problem Description Liyuan wanted to rewrite...
分类:其他好文   时间:2015-04-18 20:40:11    阅读次数:202
zoj 3497 Mistwald 矩阵快速幂
题意:给你一个n*m矩阵,每个点有四个方向可以走。室友说自己用p步走到了终点,问是一定还是可能,还是不可能。 做法:把每个点化做一数,i行j列为(i*m+j)。 然后把每个点的转移写在构造矩阵中,比如第二个案例,就只用建一条边,0->1,所以mp.a[0][1]=1。 如果到了终点,就不再走了,所以构造矩阵第一维不能是终点数字。然后p次快速幂,结果的第一行,为p步能到达的点。如果快速幂后,[0][n*m-1]不为1,那就是false。 如果为1,判断第一行其他点是否为1,如果有为1的,那么他就是可能撒谎,...
分类:其他好文   时间:2015-04-18 20:39:39    阅读次数:143
Codeforces534A:Exam
An exam for n students will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students with adjacent numbers (i and i?+?1) always stud...
分类:其他好文   时间:2015-04-18 20:39:11    阅读次数:146
从零开始启动一个项目,需要哪些准备工作
原文链接这里 话题的由来 某天午饭前,项目组一同事挑起了这个话题,由于是马上要到饭点了,所以没有细聊,但公认的结论是,从零开始准备一个项目,花费的工作量不小。 由于最近我参与了一个全新的web项目,有切身的体验,所以记录下来。 主要的工作量包括如下几点: 代码开发环境准备 开源软件选择 版本管理软件 基础代码开发 问题处理 制度建设 代码开发环境准...
分类:其他好文   时间:2015-04-18 20:37:38    阅读次数:268
Codeforces534B:Covered Path
The on-board computer on Polycarp's car measured that the car speed at the beginning of some section of the path equals v1 meters per second, and in the end it is v2 meters per second. We know tha...
分类:其他好文   时间:2015-04-18 20:38:35    阅读次数:164
Codeforces534C:Polycarpus' Dice
Polycarp has n dice d1,?d2,?...,?dn. The i-th dice shows numbers from 1 to di. Polycarp rolled all the dice and the sum of numbers they showed is A. Agrippina didn't see which dice showed what num...
分类:其他好文   时间:2015-04-18 20:37:46    阅读次数:171
Codeforces534E:Berland Local Positioning System
In Berland a bus travels along the main street of the capital. The street begins from the main square and looks like a very long segment. There are n bus stops located along the street, the i-th of ...
分类:其他好文   时间:2015-04-18 20:38:14    阅读次数:196
解决i5-4590K使用Clover引导OSX在"root device uuid is ......"之后立即重启问题
台式机电脑的CPU是i5-4590K,使用Clover 3193引导OSX在"root device uuid is ......"之后就立即重启。 查了查资料,可以通过使用Clover打Patch解决。 在KernelAndKextPatches区域内,将KernelPm字段值设为true,如果再有问题,将AppleRTC字段也设为true,这样就解决问题了。 KernelAndKextP...
分类:其他好文   时间:2015-04-18 20:38:10    阅读次数:137
2015年创业中遇到的技术问题:91-100
91.PHP日志记录方法.  error_log("error info");92.weiphp图灵机器人bug,需要修改3个地方。问题描述:启用聊天插件后,发现在微信客户端上不管输入什么内容,回复的都是预设好的内容,而无法使用图灵机器人的功能。 问题分析:经过查看源码,发现 Addons\Chat\Model\WeixinAddonModel.class.php 文件有一处 Bug,在 func...
分类:其他好文   时间:2015-04-18 20:37:04    阅读次数:171
svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted
svn cleanup failed–previous operation has not finished; run cleanup if it was interrupted
分类:其他好文   时间:2015-04-18 20:36:17    阅读次数:141
readfile & file_get_contents异同
记录一下:应用memcache时,准备把整个文件缓存到内存中,遇到了比较奇怪的事情,因为最初使用readfile来读取文件,结果这个函数返回一个字节数,而不是一个字符串,于是文件没办法再输出,最后使用file_get_contents解决问题。file_get_contents -- 将整个文件读入...
分类:其他好文   时间:2015-04-18 20:36:06    阅读次数:205
使用到定时器,单例和协议的一个小应用(1)
今天自己想完成一个类似于ios系统自带的计时器的功能。做的时候发现了很多问题,还好终于最后都一一解决了。 首先是NStimer类,这个类为我们提供了+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds target:....
分类:其他好文   时间:2015-04-18 20:35:45    阅读次数:175
实时显示内容(Thread+Handler)
class LocThread extends Thread{ @Override public void run() { while (true){ try { ...
分类:其他好文   时间:2015-04-18 20:35:41    阅读次数:134
云计算中执行运算的操作流程
物理服务器上运行了一种中间软件层,Hypervisor,然后之上是操作系统层,Hypervisor可以看作是虚拟环境中的“元”操作系统,然后所有物理服务器又链接在一起。Hypervisor的作用是把物理服务器虚拟成N个虚拟服务器,然后每个虚拟服务器上都有各自的操作系统。有计算任务需求的时候,通过某些...
分类:其他好文   时间:2015-04-18 20:31:58    阅读次数:105
VC6.0工程改名(转)
只讨论对工程改名,其他文件和类的名字不改变,否则就很麻烦了。操作步骤:(1)删除 .dsw 文件。改好了会再自动生成的;(2)以写字板或记事本方式打开.dsp文件;(3)将其中所有的原工程名字符串替换成新的工程名字符串;(4)将.dsp文件名改为新的工程名;(5)重新在VC6中打开.dsp,如果编译...
分类:其他好文   时间:2015-04-18 20:32:09    阅读次数:157
HDU 4046 Panda
PandaTime Limit: 4000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:404664-bit integer IO format:%I64d Java class name:MainWhen...
分类:其他好文   时间:2015-04-18 20:31:48    阅读次数:182
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!