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 |
字母转数字用这样不是更快`~~~In Reply To:终于过了!!总结一下超时的地方希望有所帮助。 Posted by:20071121181 at 2008-11-04 13:42:44 for(j=0;j<l;j++) { if(k==3)tmp[k++]='-'; if(str[i][j]>='0'&&str[i][j]<='9') tmp[k++]=str[i][j]; else if(str[i][j]>='A'&&str[i][j]<='P') tmp[k++]=(str[i][j]-'A')/3+2+'0'; else if(str[i][j]>='R'&&str[i][j]<='Y') tmp[k++]=(str[i][j]-'A'-1)/3+2+'0'; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator