如果你是一名C程序员,你肯定熟悉宏,它们非常的强大,如果正确使用可以让你的工作事半功倍。然后,如果你在定义宏时,很随意没有认真检查,那么它们可能使得你发狂,浪费N多时间。在很多C程序中,你可能看到许多看起来不是那么直接的较为特殊的宏定义。下面就是一个例子:1 #define _set_taks_st...
分类:
其他好文 时间:
2015-01-21 21:53:14
阅读次数:
168
贪心找最优策略。大白上有详解。 不过这里有几个值得思考的地方。 还有几个地方想不明白,脑子不够用了,先记着,改天再做一遍#include #include using namespace std;const int maxn = 100005;int n,a[maxn],left[maxn]...
分类:
其他好文 时间:
2015-01-21 21:53:50
阅读次数:
208
版主提供了 anti dylib 的文章,http://bbs.chinapyg.com/thread-76158-1-1.html原理很简单,看下面源代码即可~ 在Build Settings中找到“Other Linker Flags”在其中加上-Wl,-sectcreate,__REST...
分类:
其他好文 时间:
2015-01-21 21:54:50
阅读次数:
395
http://poj.org/problem?id=2240基本和poj 1860相同 只是把单点变成了任意点 做完1860再做这题就完全把思路套上就过了做完才发现网上的题解都用的是floyd 不过整体思路都是大同小异吧不过在效率上好像就低下了太多= =#include#include#includ...
分类:
其他好文 时间:
2015-01-21 21:52:56
阅读次数:
191
DescriptionAn inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minute b...
分类:
其他好文 时间:
2015-01-21 21:54:14
阅读次数:
155
Linux 2.6内核中提高网络I/O性能的新方法-epoll I/O多路复用技术在比较多的TCP网络服务器中有使用,即比较多的用到select函数。1、为什么select落后 首先,在Linux内核中,select所用到的FD_SET是有限的,即内核中有个参数__FD_SETSIZE定义了每个FD...
分类:
其他好文 时间:
2015-01-21 21:53:03
阅读次数:
233
原题地址分两步:1. 试探。看是否还有k个节点可以翻转2. 翻转。[]->[]->[]->[1]->[2]->[3]->[4]->[]->[]->[]->NULL |------------------| 假设要翻转这一段翻转前: ...
分类:
其他好文 时间:
2015-01-21 21:53:32
阅读次数:
156
链接:va_list百科1:概述VA_LIST 是在c语言中解决变参问题的一组宏,所在头文件:#include 2:成员#ifdef _M_ALPHAtypedef struct {char *a0; /* pointer to first homed integer argument */int ...
分类:
其他好文 时间:
2015-01-21 21:53:42
阅读次数:
143
现在许多设计软件都有这样一个问题,就是自己做好的一个设计图片然后发给别人之后,他怎么也打不开图片。折腾了老半天才发现,原来是因为软件版本不同所导致的问题。因为低版本的软件不能打开用高版本软件做出的图片文件,而高版本软件不受版本限制,都能打开低于他的版本软件做出保存的文件。今天所要讲解的就是Corel...
分类:
其他好文 时间:
2015-01-21 21:50:08
阅读次数:
159
ie、firefox、chrome中关于style="display:block" 引发的页面布局错乱的解决办法:table中tr 添加style="display:block" 导致页面布局错乱对table中tr 不显示时,添加style="display:none",ie、chrome、fire...
分类:
其他好文 时间:
2015-01-21 21:53:12
阅读次数:
191
使用SSH+密码认证(基本SSH配置方法)注:在用户使用SSH登录交换机时,交换机对所要登录的用户使用密码对其进行身份验证生成RSA和DSA密钥对 [H3C]public-key local create rsa [H3C]public-key local create dsa设置用户接口上的认证模...
分类:
其他好文 时间:
2015-01-21 21:50:33
阅读次数:
1362
DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of course, ...
分类:
其他好文 时间:
2015-01-21 21:51:40
阅读次数:
162
ATime Limit: 60ms Memory limit: 65536K有疑问?点这里^_^题目描述给出n(1#include #include struct Trie{ int flag; struct Trie *next[26];}*temp;struct Trie *newnode(){...
分类:
其他好文 时间:
2015-01-21 21:51:15
阅读次数:
174
今年一月,processPhraseTable被删除了,具体原因如下:https://www.mail-archive.com/moses-support@mit.edu/msg11372.htmlHieu推荐使用cmph编译moses并使用processPhraseTableMin注意cmph需要...
分类:
其他好文 时间:
2015-01-21 21:50:26
阅读次数:
281
Total Submission(s): 31033Accepted Submission(s): 16313Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通project”的目标是使全省不论什么两个城镇间都能够实现交...
分类:
其他好文 时间:
2015-01-21 21:49:47
阅读次数:
193
题目链接: BZOJ - 2350题目分析因为存在一个 2/3 n 大小的团,所以不在这个团中的点最多 1/3 n 个。牺牲一些团内的点,每次让一个团内的点与一个不在团内的点抵消删除,最多牺牲 1/3 n 个团内的点,至少剩余一个 1/3 n 的团。如果两个点之间没有边,那么至少有一个点在团外,删掉...
分类:
其他好文 时间:
2015-01-21 21:49:43
阅读次数:
157
1 void CreateDir(const string& strPath) 2 { 3 if (PathFileExists(strPath.c_str())) 4 { 5 return; 6 } 7 8 size_t sPrePos = 0...
分类:
其他好文 时间:
2015-01-21 21:47:28
阅读次数:
207