Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这里是应该选择什么排序法才能不TLE?我选用的是插入排序,总是过不了,难道要用快速排序?但是用快速排序还是要确定是否重复出现…… 大一新手,望各位帮帮忙啊……看在TLE多次的份上…… for(j=1;j<=pos;j++) { if(temp.tel==info[j].tel) { info[j].num++; break; } else if(temp.tel<info[j].tel) { for(k=++pos;k>j;k--) info[k]=info[k-1]; info[j]=temp; break; } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator