int a[100]; //初始状态,每个点的父亲是自己或者0,即每个点各是一个集合。 int InitSet(int MemberNum) { for(int i=0;i<MemberNum;i++) a[i]=i; /* for(int i=0;i<=MemberNum-1;i++) a[i]= ...
分类:
编程语言 时间:
2018-08-08 21:28:15
阅读次数:
145
几乎所有程序设计语言都支持数组。在C和 C++里使用数组是非常危险的,因为那些数组只是内存块。若程 序访问自己内存块以外的数组,或者在初始化之前使用内存(属于常规编程错误),会产生不可预测的后果 (注释②)。 ②:在 C++里,应尽量不要使用数组,换用标准模板库(Standard TemplateL ...
分类:
编程语言 时间:
2018-08-07 20:33:03
阅读次数:
151
本文首先从Dockerfile创建了一个简单web镜像 然后将web镜像推送到了远程仓库,以备后面集群中不同机器自动下载 之后使用docker-compose.yml配置了一个应用 而后新建了2台虚拟机作为swarm节点,并部署应用的5个实例在这两台虚拟机上 最后还讲了如何如果更改集群配置、如何扩容 ...
分类:
其他好文 时间:
2018-08-06 19:51:49
阅读次数:
210
题目链接:http://poj.org/problem?id=3580 Your friend, Jackson is invited to a TV show called SuperMemo in which the participant is told to play a memorizin ...
分类:
其他好文 时间:
2018-08-02 01:58:47
阅读次数:
177
"292. Nim Game" Description You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take ...
分类:
其他好文 时间:
2018-07-31 19:17:05
阅读次数:
223
Iahub wants to meet his girlfriend Iahubina. They both live in Ox axis (the horizontal axis). Iahub lives at point 0 and Iahubina at point d. Iahub ha ...
分类:
其他好文 时间:
2018-07-30 11:19:21
阅读次数:
323
Problem Description Last night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big maze separately. ...
分类:
Web程序 时间:
2018-07-30 01:10:52
阅读次数:
214
堆优化 dijkstra int dis[N],vis[N]; struct Node{ int x,d; Node(){} Node(int _x,int _d){ x=_x,d=_d; } friend bool operator < (Node x,Node y){ return x.d>y. ...
分类:
其他好文 时间:
2018-07-23 20:24:10
阅读次数:
165
" Portal bzoj4520 " Description 给你平面内$n$个点的坐标,求欧氏距离下第$k$远的点对 Solution 因为kd其实。。严格来说挺不熟的用的太少了qwq 然后不知道为啥第一反应凸包直径取$k$次qwq然而这样有一个问题就是。。取完一次之后删点不知道要删直径中两个点 ...
分类:
其他好文 时间:
2018-07-22 20:54:49
阅读次数:
149