Submission #690871

#TimeUsernameProblemLanguageResultExecution timeMemory
690871AiperiiiTable Tennis (info1cup20_tabletennis)C++14
0 / 100
3053 ms1988 KiB
#include <bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; vector <int> a(n+k),vec; for(int i=0;i<n+k;i++){ cin>>a[i]; vec.push_back(a[i]); } for(int i=0;i<n+k;i++){ map <int,int> mp; vec.erase(vec.begin()+i); for(int j=0;j<vec.size()-1;j++){ mp[vec[j+1]-vec[j]]++; } if(mp.size()==1){ break; } vec.insert(vec.begin()+i,a[i]); } for(int j=0;j<vec.size();j++){ cout<<vec[j]<<" "; } }

Compilation message (stderr)

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