Submission #818727

# Submission time Handle Problem Language Result Execution time Memory
818727 2023-08-10T06:31:48 Z vjudge1 Cipele (COCI18_cipele) C++17
18 / 90
29 ms 2908 KB
#include <bits/stdc++.h>

#define pb push_back
#define eb emplace_back
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define uniq(x) x.erase(unique(all(x)), x.end())
#define rall(x) x.rbegin(), x.rend()
#define each(x, v) for(auto &x : v)
#define mp make_pair

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using str = string;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

const int mod = 1e9 + 7;
const int LOG = 20;
const int maxn = 1e5 + 5;

void setIO() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
}

int32_t main() {
    setIO();

    int n, m;
    cin >> n >> m;
    vector<int> a(n), b(m);

    for(int &x : a) cin >> x;
    for(int &x : b) cin >> x;
    sort(all(a));
    sort(all(b));

    if(n == m) {
        int ans = 0;
        for(int i=0; i<n; i++)
            ans = max(ans, abs(a[i] - b[i]));
        cout << ans << '\n';
    } else {

    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 16 ms 2640 KB Output is correct
2 Correct 28 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 29 ms 2908 KB Output is correct
2 Correct 28 ms 2880 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 340 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 2364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 2608 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 2364 KB Output isn't correct
2 Halted 0 ms 0 KB -