Submission #818741

# Submission time Handle Problem Language Result Execution time Memory
818741 2023-08-10T06:35:52 Z vjudge1 Cipele (COCI18_cipele) C++17
18 / 90
98 ms 1056 KB
#include<bits/stdc++.h>
#include<math.h>

#define _USE_MATH_DEFINES

using namespace std;

/**struct node
{
    long long idx;
    long long dis;
    node(){}
    node(long long _idx,long long _dis)
    {
        idx=_idx;
        dis=_dis;
    }
    bool operator<(const node &tmp)const{
    return dis>tmp.dis;
    }
};**/

const long long maxn=1e5+10;
const long long mod=1e9+7;

int main()
{
    int n,m;
    cin>>n>>m;
    int L[n];
    int R[m];
    for(int i=0;i<n;i++)
    {
        cin>>L[i];
    }
    for(int j=0;j<m;j++)
    {
        cin>>R[j];
    }
    sort(L,L+n);
    sort(R,R+m);
    if(n==m)
    {
        int mx=0;
        for(int i=0;i<n;i++)
        {
            mx=max(mx, abs(L[i]-R[i]));
        }
        cout<<mx<<endl;
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 51 ms 1052 KB Output is correct
2 Correct 98 ms 1052 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 79 ms 1052 KB Output is correct
2 Correct 73 ms 1056 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 52 ms 852 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 57 ms 980 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 50 ms 852 KB Output isn't correct
2 Halted 0 ms 0 KB -