正文
增加 1 行删除 1 行
52 行未改动5354555657585960615 行未改动52 行未改动while (cnt > 0 && tot > 0) {int x = Rand() % tot + 1;vec.push_back(query(0, id[x]));swap(id[x], id[tot]);tot --; cnt --;}sort(vec.begin(), vec.end());if (vec.back() != ans) vec.push_back(ans);LL d = vec[1] - vec[0];5 行未改动52 行未改动5354555657585960615 行未改动52 行未改动while (cnt > 0 && tot > 0) {int x = Rand() % tot + 1;vec.push_back(query(0, id[x]));swap(id[x], id[tot]);tot --; cnt --;}sort(vec.begin(), vec.end());if (vec.back() != ans) vec.push_back(ans);LL d = vec[1] - vec[0];5 行未改动