# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
667636 | LFFB | Table Tennis (info1cup20_tabletennis) | C++14 | 32 ms | 2336 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <algorithm>
#define debug(args...) //printf(args)
const int MAX_M = 16e4;
typedef long long llong;
int n, m, k;
int input[MAX_M];
llong sum;
int main() {
scanf("%d %d", &n, &k);
if (k != 1) return 1;
m = n + k;
for (int i = 0; i < m; i++) {
scanf("%d", &input[i]);
sum += input[i];
}
int bad = -1;
for (int i = 0; i < m; i++) {
sum -= input[i];
if (sum % (n / 2) == 0) {
debug("%d is bad\n", i);
bad = input[i];
}
sum += input[i];
}
std::sort(input, input+m);
for (int i = 0; i < m; i++) {
if (input[i] == bad) continue;
printf("%d ", input[i]);
}
printf("\n");
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |