#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ld long double
#define vf v[i].first
#define vs v[i].second
const ll MOD = 1e9 + 7;
void print(vector<ll> &v) {
for (auto c:v)
cout << c << " ";
}
vector<ll>e[2005];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n,k;
cin >> n >> k;
vector<ll>v(n+k);
for (int i = 0; i < n+k; ++i)
cin >> v[i];
for (int i = 0; i < n+k; ++i) {
for (int j = 0; j < n+k; ++j) {
if (i!=j)
e[i].push_back(v[j]);
}
}
for (int i = 0; i < n+k; ++i) {
bool flag = true;
ll sum = e[i][0]+e[i][n-1];
for (int j = 1; j < n-1; ++j) {
if (e[i][j]+e[i][n-1-j]!=sum) {
flag = false;
break;
}
}
if (flag) {
print(e[i]);
break;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
32460 KB |
Output is correct |
2 |
Correct |
32 ms |
32460 KB |
Output is correct |
3 |
Correct |
34 ms |
32448 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
611 ms |
647548 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1376 ms |
1048576 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
596 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
468 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
2036 KB |
Extra information in the output file |
2 |
Halted |
0 ms |
0 KB |
- |