Submission #549741

#TimeUsernameProblemLanguageResultExecution timeMemory
549741SlyGaleebTable Tennis (info1cup20_tabletennis)C++17
11 / 100
1376 ms1048576 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...