# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
24978 | 2017-06-19T14:24:38 Z | gabrielsimoes | Fireworks (APIO16_fireworks) | C++14 | 0 ms | 2020 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n, m; scanf("%d %d", &n, &m); vector<int> v; v.resize(m+n); vector<int> p; p.resize(m+n); for (int i = 1; i < n+m; i++) scanf("%d %d", &p[i], &v[i]); if (n == 1) { sort(v.begin()+1, v.end()); ll ret = 0; for (int i = 1; i <= m; i++) ret += abs(v[m/2] - v[i]); return printf("%lld\n", ret), 0; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2020 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |