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 |
难道是我rpwt作怪...看看这里:)In Reply To:不会吧,我不信:) Posted by:hawk at 2003-11-06 22:05:10 const unsigned char themap[26]= { 2,2,2, // ABC 3,3,3, // DEF 4,4,4, // GHI 5,5,5, // JKL 6,6,6, // MNO 7,-1,7,7,// PQRS 8,8,8, // TUV 9,9,9, // WXY -1, // Z }; int map(char a) { if(a>='0' && a<='9')return a-'0'; if(a>='A' && a<='Z')return themap[a-'A']; if(a>='a' && a<='z')return themap[a-'a']; // 这行去掉就wa了 return -1; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator