Submission #159689

#TimeUsernameProblemLanguageResultExecution timeMemory
159689sochoCipele (COCI18_cipele)C++14
27 / 90
162 ms3012 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...