# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
667674 | hyakup | Table Tennis (info1cup20_tabletennis) | C++17 | 80 ms | 2332 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 <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 150010;
int v[maxn];
int main(){
int n, k; scanf("%d %d", &n, &k );
for( int i = 1; i <= n + k; i++ ) scanf("%d", &v[i] );
for( int i = 1; i <= n + k; i++ ){
int l = 1, r = n + k;
int soma = -1;
bool ok = true;
while( l < r ){
if( l == i ) l++;
if( r == i ) r--;
if( soma == -1 ) soma = v[l] + v[r];
else if( v[l] + v[r] != soma ){
ok = false;
break;
}
l++, r--;
}
if( ok ){
for( int j = 1; j <= n + k; j++){
if( j == i ) continue;
printf("%d ", v[j] );
}
break;
}
}
return 0;
}
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... |