多学习。

摘要: void inplace_swap(int *x,int *y) { *y = *x ^ *y; //step1 *x = *x ^ *y; //step2 *y = *x ^ *y; //step3 } #include <stdio.h> #include <stdlib.h> void inp 阅读全文
posted @ 2022-04-08 11:56 czyaaa 阅读(178) 评论(0) 推荐(0)
摘要: 题解 加入一个超级源点,到各个商店之间的距离为0,对商店求单源最短路,那么各个村庄到源点的最短距离就是到其最短商店的距离 vector成邻接表 #include <iostream> #include <vector> #include <cstring> #include <queue> #def 阅读全文
posted @ 2022-04-08 10:17 czyaaa 阅读(68) 评论(0) 推荐(0)