Submission #83371

# Submission time Handle Problem Language Result Execution time Memory
83371 2018-11-07T11:28:02 Z charlies_moo Cipele (COCI18_cipele) C++
0 / 90
1000 ms 4180 KB
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<vector>
#include<algorithm>
#include<stack>
#include<queue>
#include<cctype>
#include<sstream>
using namespace std;
typedef long long l;
l n,m;
l leftt[99999];
l rightt[99999];
l ans=-1;
int main(void)
{
    cin >> n >> m;
    for(int i=0;i<n;i++) cin >> leftt[i];
    for(int i=0;i<m;i++) cin >> rightt[i];
    sort(leftt,leftt+n);
    sort(rightt,rightt+m);
    for(l i=0;i<n;i++)
    {
        l temp=99999;
        for(l j=0;j<m;j++)
        {
            if((abs(leftt[i]-rightt[j]))<temp) temp=abs(leftt[i]-rightt[j]);
        }
        ans=temp;
    }
    cout << ans << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 160 ms 4088 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 580 ms 4180 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 11 ms 4180 KB Output is correct
2 Incorrect 40 ms 4180 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 4180 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 31 ms 4180 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 4180 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 4180 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1065 ms 4180 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1083 ms 4180 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1075 ms 4180 KB Time limit exceeded
2 Halted 0 ms 0 KB -