本蒟蒻在月赛T2中使用桶排完成排序的工作,80pts,T掉2个,改成sort就A了,请问是什么原因?
ll n,a[1010005],w,mon,maxa,ans;
map<int,int> mp;
int tot=1;
void tsort()
{
map<int,int>::iterator it=mp.begin();
for(it;it!=mp.end();it++)
{
while(1)
{
if(it->second==0)
break;
a[tot]=it->first;
it->second--;
tot++;
}
}
}