# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
709696 | 2023-03-14T08:04:27 Z | DarkMatter | Cipele (COCI18_cipele) | C++14 | 40 ms | 1272 KB |
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int>pi; typedef pair<ll, ll>pl; typedef vector<pi>vpi; typedef vector<pl>vpl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef vector<string> vs; typedef vector<bool> vb; const long double PI = acos(-1); const int oo = 2e9; const int MOD = 998244353; const int N = 2e5 + 7; #define endl '\n' #define all(v) (v).begin(),(v).end() #define rall(v) (v).rbegin(),(v).rend() #define read(v) for (auto& it : v) scanf("%d", &it); #define readL(v) for (auto& it : v) scanf("%lld", &it); #define print(v) for (auto it : v) printf("%d ", it); puts(""); #define printL(v) for (auto it : v) printf("%lld ", it); puts(""); void solve() { int n, m; scanf("%d %d", &n, &m); vi a(n), b(m); read(a); read(b); sort(all(a)), sort(all(b)); int ans = oo; for (int i = 0; i < min(n, m); i++) ans = min(ans, abs(a[i] - b[i])); printf("%d\n", ans); } int t = 1; int main() { //#ifndef ONLINE_JUDGE // freopen("input.txt", "r", stdin); //#endif //scanf("%d", &t); while (t--) solve(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 26 ms | 1236 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 40 ms | 1272 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Incorrect | 2 ms | 340 KB | Output isn't correct |
3 | 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 | 372 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 | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 36 ms | 1136 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 40 ms | 1192 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 31 ms | 1108 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |