Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
315798 wujunchen 最大的和 T5 C++ Wrong Answer 5 MS 716 KB 379 2026-04-12 22:20:51

Tests(0/10):


#include<bits/stdc++.h> using namespace std; #define ll long long #define pll pair<ll,ll> #define mll map<ll,ll> int main(){ ll n,d; cin>>n>>d; vector<ll>a(n),b(n); bool f=1; ll ans=-1e18; for(ll i=0;i<n;i++) for(ll j=0;j<n;j++) if(abs(a[i]-b[j])<=d){ ans=max(ans,a[i]+b[j]); f=0; } if(f==0)cout<<ans; else cout<<"None"; return 0; }


Judgement Protocol: