Submission #727581

# Submission time Handle Problem Language Result Execution time Memory
727581 2023-04-21T01:53:33 Z josanneo22 Radio (Balkan15_RADIO) C++17
0 / 100
1 ms 324 KB
/*梁*/
#include <bits/stdc++.h>
using namespace std;
void solve(){
    int n,k; cin>>n>>k;
    vector<int> x(n),p(n),s(n);
    for(int i=0;i<n;i++){
        cin>>x[i]>>p[i]>>s[i];
    }
    int ans=0;
    for(int i=0;i<n;i++){
        int mx=0;
        for(int j=0;j<n;j++){
            mx=max(mx,abs(x[i]-x[j])-p[i]-p[j]);
        }
        ans+=mx;
        p[i]+=mx;
    }
    cout<<ans<<'\n';
}
signed main(){
    ios_base::sync_with_stdio(0); cin.tie(0);
    solve();
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 324 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 324 KB Output isn't correct
2 Halted 0 ms 0 KB -