并查集。需要考虑入度。 1 #include 2 #include 3 4 #define
MAXNUM 10005 5 6 int bin[MAXNUM]; 7 int degree[MAXNUM]; 8 int nums[MAXNUM]; 9 10
int find(int x) {11...
分类:
其他好文 时间:
2014-06-02 21:31:31
阅读次数:
219
1. 做一个clear脚本,放到/bin下去 $vim /bin/clear #!/bin/bash
cmd /c cls 2. ctrl + L 3. 在cygwind中install ncurses (in Utils) and then you can
use: clear 我倾向于第三种方法...
先上题目:Find NumbersTime Limit: 10000/5000 MS
(Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s):
26Accepted Submission(s): 20Spec...
分类:
其他好文 时间:
2014-06-02 17:15:22
阅读次数:
267
-bash:warning:setlocale:LC_CTYPE:cannotchangelocale(EN_US.UTF-8)
把linux系统从中文设置英文字符集后发生以下报错
首先本系统字符集为中文UTF-8
[root@localhost~]#more/etc/sysconfig/i18n
LANG="zh_CN.UTF-8"
修改为英文UTF-8
[root@localhost~]#vim/etc/sysconfig/i..
分类:
其他好文 时间:
2014-06-02 14:49:19
阅读次数:
203
DescriptionThe police office in Tadu City
decides to say ends to the chaos, as launch actions to root up the TWO gangs in
the city, Gang Dragon and Ga...
分类:
其他好文 时间:
2014-06-02 09:38:19
阅读次数:
219
3-sum
题目描述:
Given an array S of n integers,
are there elements a, b, c in S such
that a + b + c =
0? Find all unique triplets in the array which gives the sum of zero.
题目要求:
Elements...
分类:
其他好文 时间:
2014-06-01 17:31:27
阅读次数:
471
利用windows的API,FindFirstFile和FileNextFile,采用递归遍历指定文件夹中的所有文件及文件夹,第一次windows编程,代码写的很臃肿难看,请大家多多包涵!
#include
#include
#include
#include
#define MAXN 100005
using namespace std;
void surf(WIN32_FIND_DAT...
Dungeon MasterTime Limit: 1000MSMemory Limit:
65536KTotal Submissions: 15868Accepted: 6162DescriptionYou are trapped in a 3D
dungeon and need to find ...
分类:
其他好文 时间:
2014-06-01 12:16:08
阅读次数:
147
Find The MultipleTime Limit: 1000MSMemory
Limit: 10000KTotal Submissions: 16995Accepted: 6921Special JudgeDescriptionGiven
a positive integer n, write...
分类:
其他好文 时间:
2014-06-01 11:27:41
阅读次数:
176
1.找到 /libraries/config.default.php文件(config.default.php复制到phpmyadmin目录下,然后更名为config.inc.php),该文件有如下项目(2-8)须自行配置,windows用写字板(不要用记事本,这是UTF8编码)进行编辑,在linux下直接用vim编辑.
2.查找 $cfg['PmaAbsoluteUri'] 修改为你将上传到空间的phpMyAdmin的网址
如:$cfg['PmaAbsoluteUri'] = 'http://****...
分类:
Web程序 时间:
2014-06-01 02:08:36
阅读次数:
275