Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
37641 郭澍宇 【J】T1 C++ 解答错误 0 68 MS 2080 KB 286 2025-04-30 18:20:40

Tests(0/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(a);pq.push(a-b); } int ans = pq.top(); pq.pop(); cout<<ans+pq.top()<<endl; }


测评信息: