| ||||||||||
| 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 | |||||||||
各位大哥大姐们注意看题呀!!!!!!最终输出的位数只能是8位
例如给该测试数据:
2
2345678912
2345678912
不能输出 234-5678912 2
而应该输出234-5678 2
注意:No duplicates.最后的那个点,所以有输出题目中给定的字符串最好是直接复制粘贴
最后贴一个自己的快排方法只供参考:
char a[110000][50],b[110000][50];
void qsort(int l,int r)
{
int i,j;
char x[40],temp[40];
i=l;j=r;strcpy(x,b[(i+j)>>1]);
while(i<=j)
{
while(strcmp(b[i],x)<0) i++;
while(strcmp(b[j],x)>0) j--;
if(i<=j)
{
strcpy(temp,b[i]);
strcpy(b[i],b[j]);
strcpy(b[j],temp);
i++;j--;
}
}
if(i<r) qsort(i,r);
if(j>l) qsort(l,j);
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator