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 |
水题~~~~~~~~~~~~思路int getX(bool isfront,int options,int val){ switch (options) { case 0:return (val-1)/n; case 1:if(isfront)return (val-1)%n;else return (n-1)-(val-1)%n; case 2:return (n-1)-(val-1)/n; case 3:if(isfront)return (n-1)-(val-1)%n;else return (val-1)%n; } } int getY(bool isfront,int options,int val){ switch (options) { case 0:if(isfront)return (val-1)%n;else return (n-1)-(val-1)%n; case 1:return (n-1)-(val-1)/n; case 2:if(isfront)return (n-1)-(val-1)%n;else return (val-1)%n; case 3:return (val-1)/n; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator