Max Factor
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3693 Accepted Submission(s): 1181
Problem Description
To improve the or...
分类:
其他好文 时间:
2014-08-11 17:52:32
阅读次数:
245
gcc是Linux下常用的C/C++编译驱动器。本文首先介绍了gcc整个编译连接过程,然后讨论gcc常用的选项,最后说明了gcc与g++的关系。...
分类:
其他好文 时间:
2014-08-11 17:52:22
阅读次数:
263
给一颗无向树有n个结点,有m个询问,问树上任意两点间距离,n的范围是40000,m是200
这题告诉我们一个求树上两点间距离的好方法,就是先求根到其余所有点的距离,再求出询问的LCA,答案为dis[a]+dis[b]-2*dis[lca(a,b)]
#include
#include
#include
#include
#include
#include
#include ...
分类:
其他好文 时间:
2014-08-11 17:52:12
阅读次数:
244
二路归并排序的时间复杂度是O(n*log2n),空间复杂度是O(n)。
代码如下:
/**
* 源码名称:MergeSort.java
* 日期:2014-08-11
* 程序功能:合并排序
* 版权:CopyRight@A2BGeek
* 作者:A2BGeek
*/
public class MergeSort {
public void mergeSort(int[]...
分类:
其他好文 时间:
2014-08-11 17:52:02
阅读次数:
204
题目:求 q/p 二进制小数的循环节,起点和长度。
若满足 2^phi[ n ] = 1 (mod n ) 则 数 t = phi [ n ] 一定有一个使 2^k=1 (mod n )成立的 因子 k
#include
#include
#include
#include
#include
#include
#define bug(a) cout\n";
#defin...
分类:
其他好文 时间:
2014-08-11 17:51:52
阅读次数:
183
进入操作系统
yum install docker-io
docker -d
提示没有空闲IP地址可以给桥接网卡使用了
编辑下内网网卡eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=x.x.x.x
NETMASK=255.255.248.0
BRIDGE='docker0'
新建一个docker0配置文件
DEVI...
分类:
其他好文 时间:
2014-08-11 17:51:42
阅读次数:
212
最近需要安排去两个软件公司的案例客户那里考察软件应用情况。这个事情要是两个安排地方分开来走,还是好办一些,结果为了能够一次都看,要求把两家的案例公司安排在一个城市,时间还要挨着。
并且除了我们部门还需求人力部门一块,这样算下来就涉及到6波人马,足够复杂。...
分类:
其他好文 时间:
2014-08-11 17:51:32
阅读次数:
189
星期几?
时间限制:500 ms | 内存限制:65535 KB
难度:2
描述 Acmer 小鱼儿 埋头ku算一道题 条件:已知给定 一日期 告诉你这一天是 星期 n,让你计算在未来的m的p次方的天数后是星期几?他很苦恼,聪明的你能帮助他吗?
输入有多组测试数据,每组测试数据以包含三个整数n,m,p(n10)输出输出过了这么多天后是星期几...
分类:
其他好文 时间:
2014-08-11 17:51:22
阅读次数:
245
Atlantis
Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
There are several ancient Greek texts that contain descriptions of ...
分类:
其他好文 时间:
2014-08-11 17:51:13
阅读次数:
261
这个题我是1A 突然觉得自己好叼
#include
int main()
{
printf("25\n");
return 0;
}...
分类:
其他好文 时间:
2014-08-11 17:50:22
阅读次数:
234
实现整数加减法的简单计算器
package jisuan;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBa...
分类:
其他好文 时间:
2014-08-11 17:50:12
阅读次数:
225
#include
#include
#include
GLfloat step=0.0,s=0.1;
void CALLBACK display();
void CALLBACK display()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_PROJECTIO...
分类:
其他好文 时间:
2014-08-11 17:50:02
阅读次数:
183
Cmd命令行模式修改字体:
1>在dos窗口右键【属性】字体、颜色可以设置字体大小与颜色;
2>默认字体只支持点阵字体和新宋体,点阵字体最大只能10*20;新宋体可以设置字号;
使用其他字体:(注意:通过修改注册表实现,请谨慎使用,运行regedit打开注册表)
1>打开项:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\Cur...
分类:
其他好文 时间:
2014-08-11 17:49:53
阅读次数:
565
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have
the following unique permutations:
[1,1,2], [1,2,1],
and [2,1...
分类:
其他好文 时间:
2014-08-11 17:49:32
阅读次数:
201
http://poj.org/problem?id=3690
UVA还有一道也是这样的题,LRJ给的算法是AC自动机----我还没写过,今天用HASH搞了这道题
思路很清晰,但是处理起来还因为HASH函数写混WA了几次。。。
文本矩阵n*m T个匹配矩阵p*q
思路:
1、把每一行处理出长为q的hash值
2、对于1中得到的p个哈希值在算一次哈希,这样就把一个矩阵用一个hash值...
分类:
其他好文 时间:
2014-08-11 17:49:02
阅读次数:
205
新建一个工程,选择framework & library - Cocoa Touch Static Library,命名为TestKit。删除不必要的文件。TestKitTests 和TestKit target。
新建一个Bundle 。new-file-target;选择OS X目录下FrameWork&Library中的Bundle,取名为TestiOSKit。删除TestiOSKit中T...
分类:
其他好文 时间:
2014-08-11 17:48:52
阅读次数:
246
Problem Description
Recently, Shua Shua had a big quarrel with his GF. He is so upset that he decides to take a trip to some other city to avoid meeting her. He will travel only by air and he can g...
分类:
其他好文 时间:
2014-08-11 17:48:42
阅读次数:
353