Submission #941856

# Submission time Handle Problem Language Result Execution time Memory
941856 2024-03-09T15:18:04 Z Litusiano Just Long Neckties (JOI20_ho_t1) C++14
0 / 100
0 ms 348 KB
#include<bits/stdc++.h>
using namespace std;
#define int long long

signed main(){
	int n; cin>>n;
	vector<int> v(n+1); for(int& i : v) cin>>i;
	vector<int> b(n); for(int& i : b) cin>>i;
	sort(v.begin(),v.end()); sort(b.begin(),b.end());
	for(int i = 0; i<=n; i++){
		vector<int> v1;
		for(int j = 0; j<=n; j++){
			if(i == j) continue;
			v1.push_back(v[j]);
		}
		int ans = 0;
		for(int j = 0; j<n; j++){
			ans = max(ans,v1[j] - b[j]);
		}
		cout<<ans<<" ";
	}
	cout<<endl;

}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -