Submission #1118531

#TimeUsernameProblemLanguageResultExecution timeMemory
1118531ElayV13Table Tennis (info1cup20_tabletennis)C++17
11 / 100
3054 ms6516 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define ld double const int INF = 1e18; const int mod = 12345; const int sz = 1e6 + 5; signed main() { ios_base::sync_with_stdio(0);cin.tie(0); int n , k; cin >> n >> k; vector < int > a(n + k); for(int i = 0;i < n + k;i++) { cin >> a[i]; } for(int i = 0;i < n + k;i++) { vector < int > q; for(int j = 0;j < n + k;j++) { if(j == i) continue; q.push_back(a[j]); } set < int > st; for(int j = 0;j < q.size() / 2;j++) st.insert(q[j] + q[q.size() - j - 1]); if(st.size() == 1) { for(int p : q){ cout << p << ' '; } return 0; } } }

Compilation message (stderr)

tabletennis.cpp: In function 'int main()':
tabletennis.cpp:31:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   31 |       for(int j = 0;j < q.size() / 2;j++) st.insert(q[j] + q[q.size() - j - 1]);
      |                     ~~^~~~~~~~~~~~~~
#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...