版本比较
@Starcat_qwq 使用AI生成了一个来历不明的代码,快来看看吧!
正文
增加 2 行删除 2 行
74 行未改动757677787979808182835 行未改动8990919293939495969754 行未改动74 行未改动#define debug34(x, y, z, w, u, v, t, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, t1, t2, t3, t4, t5, t6, t7, t8) cout << #x << ": " << x << " " << #y << ": " << y << " " << #z << ": " << z << " " << ##define debug35(x, y, z, w, u, v, t, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, t1, t2, t3, t4, t5, t6, t7, t8, t9) cout << #x << ": " << x << " " << #y << ": " << y << " " << #z << ": " << z << "#define debug36(x, y, z, w, u, v, t, s, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10) cout << #x << ": " << x << " " << #y << ": " << y << " " << #z << ": " <<//弘文了,(下面由AI生成),这是一个查找最小值的函数,输入是一个数组,输出是最小值。int findMin(vector<int>& nums) { int findMin(vector<int>& nums) { int l = 0, r = nums.size() - 1; while (l < r) { int mid = l + r >> 1; if (nums[mid] > nums[r]) l = mid + 1;5 行未改动public: int findMin(vector<int>& nums) { if (nums.size() == 1) return nums[0]; if (nums[0] < nums[nums.size() - 1]) return nums[0]; if (nums[0] > nums[nums.size() - 1]) { if (nums[0] > nums[nums.size() - 1]) { if (nums[0] < nums[nums.size() - 2]) return nums[0]; int l = 0, r = n - 1; while (l < r) { int mid = l + r >> 1;54 行未改动