Submission #159689

# Submission time Handle Problem Language Result Execution time Memory
159689 2019-10-24T00:59:42 Z socho Cipele (COCI18_cipele) C++14
27 / 90
162 ms 3012 KB
#include "bits/stdc++.h"
using namespace std;
 
int main() {
	
	int n, m;
	cin >> n >> m;
	
	int arr1[n], arr2[m];
	int x = min(n, m);
	
	for (int i=0; i<n; i++) cin >> arr1[i];
	for (int i=0; i<m; i++) cin >> arr2[i];
	
	sort(arr1, arr1+n); sort(arr2, arr2+m);
	
	int best = INT_MIN;
	
	for (int i=0; i<x; i++) {
		best = max(best, abs(arr1[i] - arr2[i]));
	}
	
	cout << best << endl;
	
}
# Verdict Execution time Memory Grader output
1 Correct 128 ms 2580 KB Output is correct
2 Correct 157 ms 2868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 157 ms 2876 KB Output is correct
2 Correct 162 ms 3012 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 376 KB Output is correct
2 Correct 10 ms 452 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 7 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 127 ms 2428 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 138 ms 2616 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 124 ms 2328 KB Output isn't correct
2 Halted 0 ms 0 KB -