摘要:
将一系列给定数字顺序插入一个初始为空的小顶堆H[]。随后判断一系列相关命题是否为真。命题分下列几种: x is the root:x是根结点; x and y are siblings:x和y是兄弟结点; x is the parent of y:x是y的父结点; x is a child of y 阅读全文
摘要:
http://www.tzcoder.cn/acmhome/problemdetail.do?&method=showdetail&id=3613 算出两两之间min距离,然后从起点开始循环时间点,到的了的地方进队 #include<bits/stdc++.h> using namespace st 阅读全文
摘要:
Given a sequence with n elements, if the last element is also adjacent to the first element of the sequence, the sequence is called “circular sequence 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3685 ac代码: #include<bits/stdc++.h> #define ll long long #define maxn 50010 using namespace std; const d 阅读全文