链接:https://www.nowcoder.com/acm/contest/206/A来源:牛客网 Birthday Birthday 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 1048576K,其他语言2097152K 64bit IO Format: %lld 题目描述 Read More
posted @ 2018-10-06 23:36 白雪儿 Views(438) Comments(0) Diggs(1) Edit
unique()是C++标准库函数里面的函数,其功能是去除相邻的重复元素(只保留一个),所以使用前需要对数组进行排序。 代码: Read More
posted @ 2018-10-06 23:23 白雪儿 Views(166) Comments(0) Diggs(0) Edit
SPFA :求一个点到其他所有点的最短路,时间快。队列处理,队头元素所有相邻的点进行松弛,若某个相邻的点松弛成功,则将其入队。直到队列为空时算法结束。 例题 hdu 2680 代码: 参考博客:https://www.cnblogs.com/weiyuan/p/5697899.html Read More
posted @ 2018-10-06 16:26 白雪儿 Views(1105) Comments(0) Diggs(0) Edit