# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98929 | 2019-02-27T14:53:11 Z | Sa1loum | Cipele (COCI18_cipele) | C++14 | 74 ms | 3076 KB |
#include <bits/stdc++.h> using namespace std; #define IO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define mem(a,b) memset(a, b, sizeof(a)) #define F first #define S second #define Si size #define pb(x) push_back(x) typedef double D; typedef long long ll; typedef long double ld; const int MOD=(int)1e9+7,MAX=(int)1e5+10; int n,m,a[MAX],b[MAX]; int main() { scanf("%d%d",&n,&m); if (n<m) { for (int i=0;i<n;i++) { scanf("%d",&a[i]); } for (int i=0;i<m;i++) { scanf("%d",&b[i]); } } else { for (int i=0;i<n;i++) { scanf("%d",&b[i]); } for (int i=0;i<m;i++) { scanf("%d",&a[i]); } swap(n,m); } sort(a,a+n); sort(b,b+m); if (n==m) { int mx=-1; for (int i=0;i<n;i++) { int o=fabs(a[i]-b[i]); mx=max(mx,o); } cout<<mx<<endl; return 0; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 29 ms | 2680 KB | Output is correct |
2 | Correct | 48 ms | 3064 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 47 ms | 3076 KB | Output is correct |
2 | Correct | 74 ms | 2908 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 47 ms | 2424 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 43 ms | 2680 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 38 ms | 2440 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |