Submission #472221

# Submission time Handle Problem Language Result Execution time Memory
472221 2021-09-13T09:46:09 Z SaraMostafa Cipele (COCI18_cipele) C++14
18 / 90
44 ms 1892 KB
#include <bits/stdc++.h>
#include<unordered_map>
using namespace std;
#define ll long long
#define endl "\n"
#define Sara ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const long long mod=998244353;
const double PI=acos(-1);
int main()
{
    //freopen("input.in","r",stdin);
  Sara
// 1st st
int n,m;
cin>>n>>m;
vector<ll>a(n),b(m);
for(int i=0;i<n;i++)cin>>a[i];
for(int i=0;i<n;i++) cin>>b[i];
sort(a.begin(),a.end());
sort(b.begin(),b.end());
ll mx=0;
for(int i=0;i<n;i++){
    mx=max(mx,abs(a[i]-b[i]));
}
cout<<mx<<endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 26 ms 1888 KB Output is correct
2 Correct 41 ms 1868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 44 ms 1892 KB Output is correct
2 Correct 41 ms 1868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 1484 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 37 ms 1704 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 1552 KB Output isn't correct
2 Halted 0 ms 0 KB -