Submission #667654

#TimeUsernameProblemLanguageResultExecution timeMemory
667654ThegeekKnight16Table Tennis (info1cup20_tabletennis)C++14
0 / 100
3032 ms1776 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 soma1 = 0; int soma2 = 0; for (int i = N+K; i >= 1; i--) { if (i == fora) continue; if (soma1 < soma2) soma1 += v[i]; else soma2 += v[i]; } if (soma1 == soma2) { for (int i = 1; i <= N + K; i++) if (i != fora) cout << v[i] << " "; return 0; } } } }
#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...