# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
667609 | 2022-12-01T19:19:36 Z | eric | Table Tennis (info1cup20_tabletennis) | C++14 | 40 ms | 2892 KB |
#include <bits/stdc++.h> using namespace std; int main() { int n, k, wrong; scanf("%d %d", &n, &k); long long int v[n + k], som = 0; for(int i = 0; i < n + k; i++){ scanf("%lld", &v[i]); som += v[i]; } for(int i = 0; i < n + k; i++){ long long int m = (som - v[i])*2; if(m%n != 0){ //printf("%d %d\n", som, v[i]); continue; } m /= n; long long int comp; if(i == 0)comp = v[1] + v[n + k - 1]; else if(i == n + k - 1)comp = v[0] + v[n + k - 2]; else comp = v[0] + v[n + k - 1]; //printf("%f %f\n", m, comp); if(m == comp){ wrong = v[i]; break; } } //sort(v, v + (n + k)); for(int i = 0; i < n + k; i++){ if(v[i] == wrong)continue; printf("%d ", v[i]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 596 KB | Output is correct |
2 | Correct | 28 ms | 2864 KB | Output is correct |
3 | Correct | 29 ms | 2868 KB | Output is correct |
4 | Correct | 29 ms | 2868 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 40 ms | 2892 KB | Output does not have symmetry property |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Extra information in the output file |
2 | Halted | 0 ms | 0 KB | - |