第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; } }
点赞 3

相关推荐

牛客73617529...:无端端被你骂一句
点赞 评论 收藏
分享
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
昨天 17:17
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务