제출 #667679

#제출 시각아이디문제언어결과실행 시간메모리
667679ThegeekKnight16Table Tennis (info1cup20_tabletennis)C++14
20 / 100
141 ms2980 KiB
#include <bits/stdc++.h> #define int long long using namespace std; const int MAXN = 15e4 + 10; int atual[MAXN]; int v[MAXN]; int resp[MAXN]; bool FoundResp = false; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int N, K; cin >> N >> K; for (int i = 1; i <= N + K; i++) cin >> v[i]; if (K == 1) { for (int fora = 1; fora <= N + K; fora++) { int p = 1; int q = N + K; if (fora == 1) p++; if (fora == N + K) q--; int med = v[p] + v[q]; bool funciona = true; while (p < q) { if (v[p] + v[q] != med) { funciona = false; break; } p++; q--; } // cerr << fora << " " << med << '\n'; if (funciona) { for (int i = 1; i <= N + K; i++) { if (i == fora) continue; cout << v[i] << " "; } return 0; } } } else { for (int i = 1; i <= N; i++) cout << v[i] << " "; } }
#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...