제출 #738260

#제출 시각아이디문제언어결과실행 시간메모리
738260MrAndriaTable Tennis (info1cup20_tabletennis)C++14
0 / 100
3042 ms3136 KiB
#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;j++){ if(j!=i){ v.pb(a[j]); } } sort(v.begin(),v.end()); for(int i=0;i<v.size();i++){ cout<<v[i]<<" "; } cout<<endl; return 0; } } } // for(int i=1;i<=n+k;i++){ // for(int j=1;j<=n+k;j++){ // // } // } } /* ########################### ########################## ################################ ##################################### #################### ############################################## ############################### ############################### ################################## ##################################### #################### ################################################## ################################# ################################# #################################### ##################################### #################### ###################################################### ################################### ################################### ###################################### ##################################### #################### ######################################################### ############ ######### ######## ############ ######################################## ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ##################################### #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ ######### ######## ############ ############ ############ ################# #################### ############### ############ #################### ############ ############ ############ ################# ############### ############ ################# ############ ############ ############ ################# #################### ############### ############ ############## ############ ############ ############ ################# #################### ############### ############ ############ ############ ############ ############ ################# #################### ############### ############ ########## ############ ############ ############ ##################################### #################### ############### ############ ###### ############ ############ ############ ##################################### #################### ############### ############ #### ############ ############################################################ ##################################### #################### ############### ###################### ############ ############ ############################################################## ##################################### #################### ############### ###################### ############ ############ ################################################################ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################### #################### ############### ############ ############ ############ ############ ############ ##################################### #################### ######################################################## ############ ############ ############ ############ ##################################### #################### ####################################################### ############ ############ ############ ############ ##################################### #################### ##################################################### ############ ############ ############ ############ ##################################### #################### ################################################# ############ ############ ############ ############ */

컴파일 시 표준 에러 (stderr) 메시지

tabletennis.cpp: In function 'int main()':
tabletennis.cpp:41:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   41 |     for(int i=0;i<v.size();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...