#include "bartender.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> BlendWines(int k, vector<int> r){
int n = r.size();
vector<int> v;
for(int i=0;i<n;i++){
r[i]=r[i]%10+1;
}
return r;
}
#include "taster.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> SortWines(int k, vector<int> a) {
int n = a.size();
vector<int> v[11],ans;
ans.resize(n);
for(int i=0;i<n;i++){
v[a[i]].pb(i);
}
for(int i=1;i<=10;i++){
if(v[i].size()==0) continue;
else if(v[i].size()==1){
ans[v[i][0]]=i;
}
else if(v[i].size()==2){
if(Compare(v[i][0],v[i][1])>0) swap(v[i][0],v[i][1]);
ans[v[i][0]]=i;
ans[v[i][1]]=i+10;
}
else{
for(int t=0;t<3;t++){
for(int j=0;j<t;j++){
if(Compare(v[i][t],v[i][j])>0) swap(v[i][t],v[i][j]);
}
}
for(int t=0;t<3;t++) ans[v[i][t]]=i+10*t;
}
}
return ans;
}
Compilation message
taster.cpp: In function 'std::vector<int> SortWines(int, std::vector<int>)':
taster.cpp:10:11: error: 'class std::vector<int>' has no member named 'pb'
v[a[i]].pb(i);
^~