제출 #667534

#제출 시각아이디문제언어결과실행 시간메모리
667534mmkTable Tennis (info1cup20_tabletennis)C++14
0 / 100
189 ms828 KiB
#include<bits/stdc++.h> using namespace std; const int MAXN = 16e4+10; int v[MAXN]; int main() { cin.tie(0)->sync_with_stdio(0); int n,k; cin >> n >> k; for(int i = 0; i < n+k; i++) cin >> v[i]; sort(v,v+(n+k)); int curini, curfim; int base; for(int j = 0; j < n+k; j++) { int aux = v[j]; v[j] = -1; for(int i = 0; i < (n+1)/2; i++) { curini = v[i]; curfim = v[n+k-i-1]; if(curini == -1) curini = v[i+1]; if(curfim == -1) curfim = v[n+k-i-2]; if(i == 0) base = curfim+curini; else if(curini+curfim != base) break; if(i == (n+1)/2 -1) { for(int i = 0; i < n+k; i++) { if(v[i] != -1) cout << v[i] << " "; } return 0; } } v[j] = aux; } }
#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...