#include#include#include#include#includeusing namespace std;struct Line{ int a,b,w;};vector line;vector templine;int n;int workline[20010];bool o...
分类:
其他好文 时间:
2014-10-26 22:49:27
阅读次数:
306
关于同步和异步异步传输是面向字符的传输,它的单位是字符;而同步传输是面向比特的传输,它的单位是桢,它传输的时候要求接受方和发送方的时钟是保持一致的。具体来说,异步传输是将比特分成小组来进行传送。一般每个小组是一个8位字符,在每个小组的头部和尾部都有一个开始位和一个停止位,它在传送过程中接收方和发送方...
分类:
其他好文 时间:
2014-10-26 22:51:28
阅读次数:
247
周末,睡了两个好觉.前天把周任务完成了,在看公司项目源码。发现std::map 的.front函数会发生隐士转换。 伪代码如下: std::map m_map; int &i = m_map.front(); // .fornt 函数书上写的是返回一个引用。 m_map.pop_pu...
分类:
其他好文 时间:
2014-10-26 22:49:28
阅读次数:
219
弯道超车是送给那些走弯路的人的,而每个人自己的人生中总是充满了弯路。请走好现在正在走的路。做好明天的规划吧
分类:
其他好文 时间:
2014-10-26 22:50:56
阅读次数:
238
I want to add CORS support to my server[CORS:跨域资源共享] 同源策略与JSONP
分类:
其他好文 时间:
2014-10-26 22:48:51
阅读次数:
307
渊源思维导图周国平《自信与自卑》读后感 1我信任自卑者远远超过信任自信者。据我所见,自卑者多是两个极端。其一的确是弱者,并且知道自己的弱,于是自卑。这种人至少有自知之明,因而值得我们尊重。其二是具有某种异常天赋的人,他隐约感觉到却不敢相信自己有这样的天赋,于是自卑。...
分类:
其他好文 时间:
2014-10-26 22:49:48
阅读次数:
370
一、getGenericSuperclass()和getActualTypeArguments()基本用法:import java.lang.reflect.ParameterizedType;public class TT extends TT2 {public static void main(...
分类:
其他好文 时间:
2014-10-26 22:49:01
阅读次数:
354
简单地用递归的方法实现了二分查找算法,适用于数组。二分查找算法的前提条件是数组本身是有序的,比如int arr[6] = {2, 3, 5, 7, 11, 13}; 1 int 2 BinarySearch(int arr[], int key, int left, int right) 3 { 4...
分类:
其他好文 时间:
2014-10-26 22:47:44
阅读次数:
232
级别简单,用了额外的空间,不知道这个可不可以改进,最后到时ac了。public class Solution { public void merge(int A[], int m, int B[], int n) { int res[] = new int[m + n]; ...
分类:
其他好文 时间:
2014-10-26 22:48:56
阅读次数:
234
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.思路:将单...
分类:
其他好文 时间:
2014-10-26 22:47:08
阅读次数:
166
昨天有同学(初学指针)在练习单链表和二叉树的时候,程序老是崩溃,或者得不到正确结果,于是向我求助。问题就出在指针的參数传递上,没传好指针导致内存混乱,其它代码基本全对。这个错误十分可惜。故在此我想做个记录,可能显得十分基础。假设函数的參数是普通的一级指针,那么就意味着你仅仅能使用指针、改变指针指向或...
分类:
其他好文 时间:
2014-10-26 22:47:51
阅读次数:
285
在循环体内,不论continue是作为何种语句中的语句成分,都将按上述功能执行,这点与break有所不同。
分类:
其他好文 时间:
2014-10-26 22:47:41
阅读次数:
246
看到 expected possibility 一下子 又觉得是概率dp了..这题 也的确是了但做的狠无语啊 尝试了2种 一个是TLE 一个是AC 但也要花掉了3000多ms。。而且 我也觉得这两种 区别不大啊 思想是一样的 就是处理上有点区别..应该是第二种TLE的故意被卡了时间吧 my gues...
分类:
其他好文 时间:
2014-10-26 22:47:42
阅读次数:
204
最近简单接触了LaTex排版,留下一些笔记供日后参考。 1.基本格式\documentclass{article}\title{……}\begin{document}\maketitle\section{……}……\\……\subsection{……}……\subsubsection{……}…...
分类:
其他好文 时间:
2014-10-26 22:46:31
阅读次数:
269
function(str,num){ var len=str.length if(str.replace(/[\u4e00-\u9fbf]/g,'**').length num){ str = str.slice(0,len--) } re...
分类:
其他好文 时间:
2014-10-26 22:45:06
阅读次数:
159
int sendto (int s, const void *buf, int len, unsigned int flags, const struct sockaddr *to, int tolen); int recvfrom(int s, void *buf, int len, unsign...
分类:
其他好文 时间:
2014-10-26 22:44:54
阅读次数:
310
Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the...
分类:
其他好文 时间:
2014-10-26 22:43:56
阅读次数:
178