参考: https://blog.csdn.net/qq_30486241/article/details/49702467 力扣 16:最接近的三数之和 官方题解中关于如下代码解释 //解释见参考链接 auto update = [&](int cur) { if (abs(cur - target) < abs(best - target)) { best = cur; } };