# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
738261 | 2023-05-08T10:42:26 Z | MrAndria | Table Tennis (info1cup20_tabletennis) | C++14 | 3000 ms | 2900 KB |
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second long long n,k,sum,ans,a[1000005]; vector <long long> v; map <long long,long long> mp; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cin>>n>>k; for(int i=1;i<=n+k;i++){ cin>>a[i]; sum+=a[i]; } if(k==1){ for(int i=1;i<=n+k;i++){ mp.clear(); for(int j=1;j<=n+k;j++){ mp[a[j]]++; } ans=0; mp[a[i]]--; for(int j=1;j<=n+k;j++){ if(j!=i){ if(mp[((sum-a[i])/(n/2))-a[j]]>=1 and mp[a[j]]>=1){ mp[((sum-a[i])/(n/2))-a[j]]--; ans++; mp[a[j]]--; } } } if(ans==(n/2)){ for(int j=1;j<=n+k;j++){ if(j!=i){ v.pb(a[j]); } } sort(v.begin(),v.end()); for(int j=0;j<v.size();j++){ cout<<v[j]<<" "; } cout<<endl; return 0; } } } // for(int i=1;i<=n+k;i++){ // for(int j=1;j<=n+k;j++){ // // } // } } /* ########################### ########################## ################################ ##################################### #################### ############################################## ############################### ############################### ################################## ##################################### #################### ################################################## ################################# ################################# #################################### ##################################### #################### ###################################################### ################################### ################################### ###################################### ##################################### #################### ######################################################### ############ ######### ######## ############ ######################################## ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ #################### ############ ############ ############ ################# ############### ############ ################# ############ ############ ############ ################# #################### ############### ############ ############## ############ ############ ############ ################# #################### ############### ############ ############ ############ ############ ############ ################# #################### ############### ############ ########## ############ ############ ############ ##################################### #################### ############### ############ ###### ############ ############ ############ ##################################### #################### ############### ############ #### ############ ############################################################ ##################################### #################### ############### ###################### ############ ############ ############################################################## ##################################### #################### ############### ###################### ############ ############ ################################################################ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ######################################################## ############ ############ ############ ############ ##################################### #################### ####################################################### ############ ############ ############ ############ ##################################### #################### ##################################################### ############ ############ ############ ############ ##################################### #################### ################################################# ############ ############ ############ ############ */
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 468 KB | Output is correct |
2 | Correct | 668 ms | 596 KB | Output is correct |
3 | Correct | 694 ms | 596 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3060 ms | 2900 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 16 ms | 1432 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |