第2题 同样是排序 3道自测都过了 为什么提交是0% #include<bits/stdc++.h> using namespace std; int main(){ vector<int> nums{1}; int n, x, y; cin >> n; int tmp; for(int i = 0; i < n; i++){ cin >> tmp; nums.push_back(tmp); } sort(nums.begin(), nums.end()); cin >> x >> y; int l = nums[x], r = nums[x + 1]; if(x == 0){ cout << "infinity" << endl; } else{ cout << r - l << endl; } }