摘要:
An IO call issynchronousif, when you call it, it does not return until the operation is completed, or until enough time has passed that your network s... 阅读全文
摘要:
class parent{public: ~parent() { std::cout children = son; son->parent = father;}在函数 test() 中,father->children = son, 使得 father 的计数器加至 2, son 同理... 阅读全文
摘要:
Environment, Ubuntu 14.04set up guideSet up cool compiler1. sudo apt-get install flex bison build-essential csh openjdk-6-jdk libxaw7-dev libc6-i3862.... 阅读全文
摘要:
这次作业题要求实现25个点的TSP问题TSP的非递归动规解法本身就有一定的难度,但本题的重点却是内存优化,因为25点的 TSP 动规解法需要的内存较多为了优化空间复杂度,这里引入了两个技巧:1. Gosper's hack2.Combinadic首先,还是要清楚了解TSP解法的状态转移方程,这里对状... 阅读全文
摘要:
题意:所给数据中是否有负环? 没有负环的图中所有路径中最短的值思路:1. bellmanford 判断负环2.flodyWarshall 求所有定点的最短路径细节:1. bellmanford 算法时间复杂度为 o(n^3), 因为图的使用邻接矩阵存储的, 使用邻接表代码会容易理解些, 引用 wik... 阅读全文
摘要:
题意:what is the largest value ofksuch that there is ak-clustering with spacing at least 3? That is, how many clusters are needed to ensure that no pair... 阅读全文
摘要:
题意:computing a max-spacingk-clustering.spacing 是指两个 cluster 之间的最小距离输入:[number_of_nodes][edge 1 node 1] [edge 1 node 2] [edge 1 cost][edge 2 node 1] [e... 阅读全文
摘要:
memcpy() 的解释:void* memcpy(void* dst, const void* src, size_t n);// if copying takes place between objects that overlap, the behavior is undefined.因此自己... 阅读全文
摘要:
最近被找实习的事情打击的不轻,连讲话都没有底气了。我心里明白做人要无条件自信,但夜幕降临时心中还是充满恐惧。有时灵光一现,觉得自己有无限潜力,觉得自己未来充满希望,可是这种感觉稍纵即逝,维持不起来。有些被称为激励大师的人,我想他们应该有带动别人灵光并将其维持一小段时间的能力。我也想时刻保持这种有灵光... 阅读全文
摘要:
代码模式为一个对象提供代码,并由代理控制对原对象的引用。在一定的情况下,客户不想或不能操作原对象,就可以通过代理以中介的方式控制。比如 windows 快捷方式模式图总结1. 代理既可以提供对原对象的原始接口引用,也可以扩展原始对象的功能或设置上下文(如上图) 阅读全文