百度之星 2019 预赛三 A 最短路 1

题目链接

分析

异或运算满足「三角不等式」。
$forall a, b, c in mathbb{Z}_{ge 0}$,有 $a xor b le (a xor c) + (c xor b)$ 。
证明:容易证明:$forall a, b in mathbb{Z}_{ge 0}$,有 $a xor b le a + b$,因此 $a xor b = (a xor c) xor (c xor b) le (a xor c) + (c xor b)$ 。

原文地址:https://www.cnblogs.com/Patt/p/11408592.html