E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
intset
hdoj 1233 还是畅通工程---最小生成树---Kruskal算法
include #include #include usingnamespacestd; constintmaxn=5005; structnode{ intu,v,weight; }edge[maxn];
intset
xiaozhuaixifu
·
2013-07-25 22:00
最小生成树
kruskal算法
Redis
intset
Redisintset也非常简单。它是一个有序整数集合,实际上是一个有序数组,查找时二分查找,添加时可能需要内存挪动。唯一不同的是,它的整数类型是变动的,可以支持int16,int32,int64三种,当然用越小的单位越省内存。只有当当前的整数类型存不下更大的整数时,才让整数类型变大。看结构就了解了:typedefstructintset{ uint32_tencoding; uint32_tle
jollyjumper
·
2013-06-20 21:00
redis
源码
intset
poj1041John's trip(欧拉回路+输出路径)
{ intfrom,to,id,next; boolvis; }edge[N]; intflag[N]; structnd { inta,b,c; }lcm[N]; intnum; intx,y;
intset
ophunter
·
2013-06-06 19:00
图论
求朋友圈个数
#include
intset
xc889078
·
2013-06-05 16:00
列出所有K个元素的子集
代码如下:1#include2#defineMAX100034intmain()5{6intn=5;7
intset
[MAX]={1};8intindex=0;9intcount=2;10intk=3;11while
Jlins
·
2013-05-31 21:29
C++ 标准模板库STL set 使用方法与应用介绍(一)
{ /*typeofthecollection: *-noduplicates *-elementsareintegralvalues *-descendingorder */ typedefset>
IntSet
shihui512
·
2013-05-14 08:00
C++
c
iterator
STL
cc++
SQL SERVER分割字符串
varchar(1024),@split varchar(10))returns intasbegindeclare @location intdeclare @start intdeclare @length
intset
happyzpx
·
2013-04-27 10:00
SQL Server
SQL Server
NYOJ42 一笔画问题
参考代码:#include #include
intset
[1001]; intfind(intk) { intr=set[k]; while(r!=set[r]) r
kay_zhyu
·
2013-04-16 19:00
腾讯第二届马拉松22号第五题
#include
intset
[100000+10]
kay_zhyu
·
2013-03-23 08:00
hdu 1863 最小生成树
*/#include #include
intset
[105],flag; stru
Crazy_xiaohe
·
2013-03-16 12:00
c
算法
最小生成树
ACM
并查集
SetErrorMode禁弹出软盘对话框
intset
_error() { SetErrorMode(SEM_NOOPENFILEERRORBOX|SEM_NOOPENFILEERRORBOX|SEM_NOGPFAULTERRORBOX|SEM_NOALIGNMENTFAULTEXCEPT
chinafe
·
2013-03-05 14:00
c++输出(<<)操作符重载
代码通过VS2008编译运行注意:输出和输入操作符,必须声明为类的友元函数#include#include#includeclassCheakoutRecord{public:
intset
_book
wangjiaoyu250
·
2013-03-04 10:00
面试总结与分析(一)
一,找出程序中的错误
intset
(char*strDest,constchar*str){ charstring[10]; char*str1="0123456789"; strcpy(string
asdfghjashuang
·
2013-02-25 19:00
hdu 1102 Constructing Roads
include usingnamespacestd; #defineNUM105 structpoints { intstart; intend; intw; }pos[10005];
intset
jjike
·
2013-02-15 20:00
hdu 1233 还是畅通工程
,看两端是否属于不同的子图;若是,加入;否则,放弃;三、循环操作该步骤二,直到有N-1条边;AC代码:#include #include #include #defineNUM10005
intset
[
jjike
·
2013-02-09 20:00
hdu 1232 畅通工程
AC代码:#include #defineNUM1005
intset
[NUM]; intn; voidinit() { for(inti=0;i<=n;i++){ set[i]=i;
jjike
·
2013-02-09 17:00
HDU
HDU
hdu 1856 More is better (究级版)
AC代码:#include usingnamespacestd; #defineNUM10000005
intset
[NUM]; intans[NUM];//以i为顶点的集合所含元素
jjike
·
2013-02-09 16:00
hdu 1325 Is It A Tree?
AC代码:#include #defineNUM100005
intset
[NUM]; intvisit[NUM]; intlu[NUM]; voidinit() { i
jjike
·
2013-02-08 11:00
HDU
HDU
hdu 1213 How Many Tables
AC代码:#include #include intn,m,res; #defineNUM1005
intset
[NUM]; intfind(intx) { returnset[x]; } voidmerge
jjike
·
2013-02-07 17:00
POJ 1703 Find them, Catch them
a[x]=0 表示x与父节点同gang a[x]=1表示与父节点不同gang#include #include usingnamespacestd; constintMAXN=100005;
intset
yang_7_46
·
2013-01-29 21:00
POJ 1182 食物链
a[x]=0父子同类 a[x]=1子吃父 a[x]=2父吃子#include #include usingnamespacestd; constintMAXN=50005;
intset
[MAXN]
yang_7_46
·
2013-01-29 17:00
列出所有K个元素的子集-----2013年1月26日
代码如下:1#include2#defineMAX100034intmain()5{6intn=5;7
intset
[MAX]={1};8intindex=0;9intcount=2;10intk=3;11while
NeilHappy
·
2013-01-26 09:47
算法
数据结构
算法(数据结构)每天一题
列出所有K个元素的子集-----2013年1月26日
代码如下:1#include 2#defineMAX1000 3 4intmain() 5{ 6intn=5; 7
intset
[MAX]={1}; 8intindex=0; 9intcount
NeilHappy
·
2013-01-26 09:47
数据结构
算法
产生所有排列---旋转法------2013年1月22日
代码如下:1#include2#defineMAX100034intn=3;//thenumberofsetelement5
intset
[MAX]={1,2,3};67//movetheset[0]toset
NeilHappy
·
2013-01-22 16:39
算法
数据结构
算法(数据结构)每天一题
产生所有排列---旋转法------2013年1月22日
代码如下:1#include 2#defineMAX1000 3 4intn=3;//thenumberofsetelement 5
intset
[MAX]={1,2,3}; 6 7//movetheset
NeilHappy
·
2013-01-22 16:39
数据结构
算法
列出所有子集----------2013年1月3日
很容易写出如下的代码:1#include 2#defineMAX1000 3 4intn=3;//thenumberofthesetelements 5
intset
[
NeilHappy
·
2013-01-03 20:56
数据结构
算法
列出所有子集----------2013年1月3日
很容易写出如下的代码:1#include 2#defineMAX1000 3 4intn=3;//thenumberofthesetelements 5
intset
[MAX]
NeilHappy
·
2013-01-03 20:00
poj1182食物链 并查集
#include #include usingnamespacestd; constintmaxn=50005;
intset
[maxn],c[maxn]; //set记录父亲节点,c记录当前节点与根节点的关系
HELLO_THERE
·
2013-01-01 15:00
小米面试题 朋友圈 并查集
首先贴出如下代码:#defineN5 intEdge[N][N];
intset
[N]; voidTest1() { for
miao6664659
·
2012-12-07 21:00
HDU 1272并查集 开始错的很郁闷 另外HDU1325&&POJ1308
pid=1272AC代码:#include #include #include #definemaxn100001 usingnamespacestd;
intset
[maxn],num[maxn];
i_fuqiang
·
2012-12-05 22:00
HDU
HDU 1181 其实26 * 26的矩阵
想到了map,mutimap,其实根本不需要那么麻烦,把问题抽象一下,其实就是26*26然后判断可达性#include usingnamespacestd; intmap[26][26];
intset
vsooda
·
2012-09-09 10:00
最小生成树(kruskal+并查集实现)
具体实现(C++):#include#include#include#define M9999#defineN6usingnamespacestd;
intset
[N]={0,1,2,3,4,5};intedge
zhouhong1026
·
2012-08-24 15:00
串口通信实现
#include #include #include #include #include #include #definedev"/dev/ttyS1" #defineMAX_SIZE2048
intset
_co
jia0511
·
2012-08-21 16:00
unix
struct
测试
ubuntu
buffer
Terminal
poj1861/zoj1542 (最小生成树krusual)
#include"stdio.h" #include"stdlib.h"
intset
[15001]; structnode { inta,b,dis; }aa[15001]; intfind(intx
yyf573462811
·
2012-08-01 19:00
poj 1251Jungle Roads (最小生成树:prime+krusual)
点击打开链接krusual:#include"stdio.h" #include"stdlib.h"
intset
[101]; structnode { inta,b,dis; }aa[101]; intfind
yyf573462811
·
2012-07-31 07:00
poj 1308 Is It A Tree? (最小生成树)
#include"stdio.h"
intset
[1002],v[1003],cnt[1002],flag; voidfun() { inti; flag=0; for(i=1;i1)t++; } if
yyf573462811
·
2012-07-31 07:00
hdu 4313 Matrix 并查集
1条边,思路:先对边进行降序排序,然后插入边,如果该边的两个顶点都是属于这k个顶点,那么这条边要删去代码:#include #include #include usingnamespacestd;
intset
wconvey
·
2012-07-26 23:00
struct
System
ini
Matrix
HDOJ 1233 还是畅通工程
思路:克鲁斯卡尔#include #include #include #definemaxn111 structln { inta,b,dis; }path[maxn*maxn];
intset
[
sdc1992
·
2012-07-20 10:00
struct
Path
merge
使用多路复用实现3个串口的通信
串口配置函数:/* *set_com_config.c * *Createdon:2012-7-18 *Author:liwei.cai */ #include
intset
_com_config(intfd
CAILIWEI712
·
2012-07-19 19:00
HDOJ 1863 畅通工程
#include #include #include structln { inta,b,c; }con[10000];
intset
[1000]; intcmp(con
sdc1992
·
2012-07-19 10:00
c
算法
struct
ini
merge
HDOJ 1232 畅通工程
#include
intset
[1500]; intfind(intx) { while(set[x]!
sdc1992
·
2012-07-19 10:00
merge
HDOJ 1272 小希的迷宫
#include #include
intset
[100000+10]; intfind(intx) { while(set[x]!
sdc1992
·
2012-07-16 20:00
merge
hdu1116
2012-07-16*/#include"stdio.h" #include"string.h"
intset
[30]; voidbuild(n) { inti; for(i=1;i1){printf
Ice_Crazy
·
2012-07-16 19:00
hdu1325
/*分析: 并查集,水水更健康~ 2012-07-16*/#include"stdio.h" #include"string.h"
intset
[1011]; intindegree
Ice_Crazy
·
2012-07-16 16:00
hdu1829
2012-07-16*/#include"stdio.h" #include"string.h"
intset
[2011]; intsex[2011]; voidbuild(intn) { inti
Ice_Crazy
·
2012-07-16 15:00
Linux外部中断的驱动初始化
外部中断的驱动初始化时应该完成以下几个步骤:1.把对应的引脚设置成中断功能2.设置中断类型(IRQ或者FIQ)3.设置触发方式4.使能此中断设置触发方式的函数接口
intset
_irq_type(unsignedintirq
huanggenda568
·
2012-07-06 20:00
linux
int_size_is_32(),判断int是否为32位
首先进行的尝试:intIs_Int_32() {
intset
_msb=10) digit_count++; returndigit_count==2?1:0; }不用移位计算可以计算判断int是否3
coder_xia
·
2012-04-23 17:00
c
OS
sun
语言
编译器
串口初始化配置(备忘)
于是仔细看了程序中关于串口配置这一块的程序,
intset
_opt(intfd,intnSpeed,intnBits,charnEvent,intnStop) {
tietao
·
2012-04-17 15:00
struct
input
processing
Terminal
output
structure
九亿计数据记录
导入数据前d 盘的可用量为310G-- 执行450000次每次2000条记录CREATE PROCEDURE daemonDataGenerateASdeclare @cnt
INTset
@cnt =
onlyor
·
2012-04-06 14:00
sqlserver
Request_irq和setup_irq的区别
*/
intset
Tommy_wxie
·
2012-03-26 11:00
上一页
6
7
8
9
10
11
12
13
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他