Submission #285197

# Submission time Handle Problem Language Result Execution time Memory
285197 2020-08-28T11:37:11 Z IWANTTOGETGOLDINIOI Art Exhibition (JOI18_art) C++14
0 / 100
1 ms 384 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define ar array

const int NxM=1e5+5;
int a[NxM],b[NxM];

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i]>>b[i];
	}
	vector<int>v;
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			int S=0;
			if(i!=j){
				S+=(b[i]+b[j]);
				int ans=S-(max(a[i],a[j])-min(a[i],a[j]));
				v.push_back(ans);
			}
		}
	}
	cout << *max_element(v.begin(),v.end()) << endl;;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -