Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
37642 郭澍宇 【J】T1 C++ 通过 100 60 MS 2080 KB 286 2025-04-30 18:22:01

Tests(10/10):


#include<bits/stdc++.h> using namespace std; priority_queue<int>pq; int main(){ int n; cin>>n; for(int i = 1;i<=n;i++){ int a,b; cin>>a>>b; pq.push(b);pq.push(a-b); } int ans = pq.top(); pq.pop(); cout<<ans+pq.top()<<endl; }


测评信息: