| ||||||||||
| 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 | |||||||||
弄个映射函数果然可以省去很多代码。hoho~~int aux_func(int n, int s)
{
if(n==0)
return 0;
if(n>0 && n<s+1)
return 1;
if(n==s+1)
return 2;
if(n>s+1 && n<s+s+2)
return 3;
if(n==s+s+2)
return 4;
}
然后:
putchar(table[n[ni]-'0'][aux_func(i, s)][aux_func(j, s)]);
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator