码迷,mamicode.com
首页 > 其他好文
【数论】【暴力】bzoj4052 [Cerc2013]Magical GCD
考虑向一个集合里添加一个数,它们的gcd要么不变,要么变成原gcd的一个约数。因此不同的gcd只有log个。所以对于每个位置,维护一个表,存储从这个位置向前所有的不同的gcd及其初始位置,然后暴力更新答案,反正这个表不会很长。#include#include#includeusing namespa...
分类:其他好文   时间:2015-05-12 08:08:35    阅读次数:125
TCP通信
一个程序使用套接字需要执行4个步骤。 –分配套接口和初始化。 –连接。 –发送或接收数据。 –关闭套接字。涉及到的调用包括socket、 bind、 listen、 connect、 accept、 recv、 send。分配套接口和初始化。 –我们需要做的第一件工作就是分配套接口。 –...
分类:其他好文   时间:2015-05-12 08:08:13    阅读次数:114
然而一年又过去了呢
我的初二小学弟也到了要开始找高中读的年纪了呢 去年这个时候我在干什么? AFO了大半年 6.22 第一次来到镇中机房 真的改变了我好多呢 现在想起来 那大概是最幸福的一段日子了吧 最能带来振奋与救赎的 终究还是信仰啊
分类:其他好文   时间:2015-05-12 08:06:24    阅读次数:78
小猴子下落
有一颗二叉树,最大深度为D,且所有叶子的深度都相同。所有结点从左到右从上到下的编号为1,2,3,·····,2的D次方减1。在结点1处放一个小猴子,它会往下跑。每个内结点上都有一个开关,初始全部关闭,当每次有小猴子跑到一个开关上时,它的状态都会改变,当到达一个内结点时,如果开关关闭,小猴子往左走,否...
分类:其他好文   时间:2015-05-12 08:06:59    阅读次数:97
UDP通信
UDP和TCP的对比。 –UDP处理的细节比TCP少。 –UDP不能保证消息被传送到目的地。 –UDP不能保证数据包的传递顺序。 –TCP处理UDP不处理的细节。 –TCP是面向连接的协议。 –UDP是无连接协议。 –TCP保持一个连接。 –UDP只是把数据发送出去而已。TCP的优点...
分类:其他好文   时间:2015-05-12 08:05:48    阅读次数:110
领域驱动设计核心
转载领域驱动设计(DDD)部分核心概念的个人理解领域驱动设计(DDD)是一种基于模型驱动的软件设计方式。它以领域为核心,分析领域中的问题,通过建立一个领域模型来有效的解决领域中的核心的复杂问题。Eric Ivans为领域驱动设计提出了大量的最佳实践和经验技巧。只有对领域的不断深入认识,才能得到一个解...
分类:其他好文   时间:2015-05-12 08:04:55    阅读次数:133
小窍门
如何将域名转化为IP地址#include #include #include #include #include #include #include const char *getIPAddrbyHostname(const char *hostname){ static char s[128...
分类:其他好文   时间:2015-05-12 08:04:06    阅读次数:96
【leetcode】Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:其他好文   时间:2015-05-12 08:05:45    阅读次数:134
DOM操作
什么是DOM? DOM,即Document Object Model,对象文本模型,用于方便开发者对HTML结构元素内容进行展示和修改DOM的三种形式:DOM、HTML DOM、CSS DOM元素内容的操作 html():获取元素中的HTML内容 html(value):设置元素中的HTML内...
分类:其他好文   时间:2015-05-12 08:04:12    阅读次数:125
video inkscape digikam
inkscape and digikam are strongly recommanded software for pictures and photosfor viedos:yaourt -S alsa-utils mplayer smplayer gstreamer0.10-ffmpeg gs...
分类:其他好文   时间:2015-05-12 08:03:23    阅读次数:134
wqy-zenhei, firefox-i18n-zh-cn, flashplugin, wqy-microhei ttf-arphic-ukai ttf-arphic-uming file-roller unrar zip unzip p7zip arj etc
yaourt -S wqy-zenhei, firefox-i18n-zh-cn, flashplugin, wqy-microhei ttf-arphic-ukai ttf-arphic-uming file-roller unrar zip unzip p7zip arj unace libr....
分类:其他好文   时间:2015-05-12 08:03:02    阅读次数:339
Configuring Zsh
$ yaourt -S zsh aur/oh-my-zsh-gitRun for the first time, zsh will prompt for configuration. Just ignore it, because we could use oh-my-zsh to help lat...
分类:其他好文   时间:2015-05-12 08:03:30    阅读次数:116
makethe 'locate' available to the system.
Although in other distros locate and updatedb are in the findutils package, they are no longer present in Arch's package. To use it, install the mloca...
分类:其他好文   时间:2015-05-12 08:03:23    阅读次数:133
make use a 'sudoer'
swith to super user 'root', issue this command:#visudoadd this line to it:victor ALL=(ALL) NOPASSWD: ALL'NOPASSWD', as it indicates, lets user to issu...
分类:其他好文   时间:2015-05-12 08:03:41    阅读次数:115
cuda自己常犯的傻逼错误
1.使用shared memory时如果申明__shared__ myshared;在使用kernel函数时不需要指明shared的大小如果使用extern __shared__ myshared;需要再使用kernel时再<<<>>>中指明所使用的sharedmemory的大小.2.没有为申明的d...
分类:其他好文   时间:2015-05-12 08:02:58    阅读次数:110
Configuring LAMP
First, install necessory packages:yaourt -S apache php mariadb phpmyadmin php-apache Note: libphp5.so included with php-apache does not work with mod_...
分类:其他好文   时间:2015-05-12 08:01:19    阅读次数:119
209. Minimum Size Subarray Sum
Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return 0 i...
分类:其他好文   时间:2015-05-12 06:57:10    阅读次数:116
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!