Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.class Solution {public: .....
分类:
其他好文 时间:
2014-11-02 22:15:06
阅读次数:
111
1 引言 不带缓冲区的I/O(unbuffered I/o)是指每个read 和 write 都调用内核中的一个系统调用,这些不带缓冲区的I/O 不是ISO C 的组成部分。2 文件描述符 每个打开的文件都通过文件描述符引用,文件描述符是一个非负整数。open 和 create 函数返回的文件描.....
分类:
其他好文 时间:
2014-11-02 22:13:44
阅读次数:
238
FroggerTime Limit:1000MSMemory Limit:65536KTotal Submissions:26519Accepted:8633DescriptionFreddy Frog is sitting on a stone in the middle of a lake. S...
分类:
其他好文 时间:
2014-11-02 22:11:44
阅读次数:
228
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1758晕。。。。状压没考虑循环方向然后错了好久。。这点要注意。。。(其实就是01背包变成了完全背包QAQ我们...
分类:
其他好文 时间:
2014-11-02 22:11:16
阅读次数:
233
题目:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not poss...
分类:
其他好文 时间:
2014-11-02 22:12:23
阅读次数:
146
添加spring支持,同前添加Hibernate支持,注意加上注解支持建包,并反向生成实体类,注意使用注解,去掉实体类映射文件添加struts支持找到applicationContext.xml文件,找到beans标签,在命名空间内,添加context,如下:xmlns:context=http:/...
分类:
其他好文 时间:
2014-11-02 22:11:23
阅读次数:
161
本次我们采用了调查问卷的方式,共六个具有代表性的问题,调查样本为30人,以下为具体调查结果。1.您的性别 男(18) 女(12)2.您常用的系统 windows(21) imac(7) linux(2)3.您对系统内置搜索引擎的感受 很赞(6) 一般般(10) 很差(14)4.您常用的搜...
分类:
其他好文 时间:
2014-11-02 22:10:30
阅读次数:
149
健身了6个月,成功减去了将近30斤赘肉,身体更强壮、更健康了。很多人都很关心我是怎么做到的,现在我就写一篇文章来总结下。
分类:
其他好文 时间:
2014-11-02 22:12:15
阅读次数:
96
在MEF的宿主中,当我们通过Import声明导入的对象时,组装(Compose)的时候会创建该对象。例如:
interface ILogger{void Log(string message);}[Export(typeof(ILogger))]class ConsoleLogger : I...
分类:
其他好文 时间:
2014-11-02 22:11:26
阅读次数:
174
从八月份开始到十一月份,目标外企和创业型公司,另外BAT投递岗位阿里,腾讯,有道,美团,创新工场(布丁微车,应用汇),小米,美团,yahoo,HTC研究院,微软,网易游戏阿里,忘记了笔试,内推晚了(阿里今天八月份就开始了……)腾讯,没有给笔试机会(应该是报北京岗位,直接被刷)有道,提前批挂掉了,校招...
分类:
其他好文 时间:
2014-11-02 22:11:16
阅读次数:
536
Unrhymable RhymesTime Limit:10000MSMemory Limit:32768KB64bit IO Format:%lld & %lluDescriptionAn amateur poet Willy is going to write his first abstrac...
分类:
其他好文 时间:
2014-11-02 22:10:54
阅读次数:
149
在编译boost.log 的示例程序时,遇到了下面的错误:zhifan$ make boost_log LDFLAGS='-lboost_log-mt'Undefined symbols for architecture x86_64:"boost::log::v2s_mt_posix::recor...
分类:
其他好文 时间:
2014-11-02 22:10:05
阅读次数:
348
实践补充 Installing Tomcat 7.0.x on OS X...
分类:
其他好文 时间:
2014-11-02 21:06:35
阅读次数:
166
1. CopyOnWriteArrayList的迭代器保留一个执行底层基础数组的引用,这个数组当前位于迭代器的起始位置,由于基础数组不会被修改(修改都是复制一个新的数组),因此对其同步只需要保证数组内容的可见性。多个线程可以同时对这个容器进行迭代,而不会彼此干扰或者与修改容器的线程互相干扰。不会抛出CocurrentModificationException,并且返回元素与创建迭代器创建时的元素完全一致,不必考虑之后修改操作带来影响。
2. 每次修改容器都会复制底层数组,这需要一定开销,特别是容器规模较大。...
分类:
其他好文 时间:
2014-11-02 21:05:28
阅读次数:
261
没事模拟模拟。。。
做模拟贵在不慌不乱、有条不紊的心境~
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int q[5050]; int n,pi;
long long words[5050]; long long a...
分类:
其他好文 时间:
2014-11-02 21:07:10
阅读次数:
208
Yaoge’s maximum profit
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 516 Accepted Submission(s): 150
Problem Description
Yaoge li...
分类:
其他好文 时间:
2014-11-02 21:05:10
阅读次数:
335