update code
This commit is contained in:
parent
b62e5e7c9e
commit
f9b5b3927f
@ -15,16 +15,13 @@ void solve()
|
|||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
cin>>x;
|
cin>>x;
|
||||||
st.insert(x);
|
st.insert(x-1);
|
||||||
}
|
}
|
||||||
cin>>c;
|
cin>>c;
|
||||||
sort(c.begin(),c.end());
|
sort(c.begin(),c.end());
|
||||||
vector<int>v;
|
int i=0;
|
||||||
for(auto x:st) v.push_back(x);
|
for(auto x:st)
|
||||||
for(int i=0; i<st.size(); ++i)
|
s[x]=c[i++];
|
||||||
{
|
|
||||||
s[v[i]-1] = c[i];
|
|
||||||
}
|
|
||||||
cout<<s<<endl;
|
cout<<s<<endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user