跳到正文

个人记录

B3670 [语言月赛202210] 玉桂狗

Harry_W约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 1 分钟
获赞
1

版本

  1. v1当前

题目传送门

C++
#include<iostream>
using namespace std;
int main()
{
    int n,r,k,p,max_k=-1;
    cin>>n>>r;
    for(int i=1;i<=n;i++){
        cin>>k>>p;
        if(p<=r) max_k=max(max_k,k);
    }
    cout<<max_k;
    return 0;
}
原文