题目:http://acm.hdu.edu.cn/showproblem.php?pid=2055
#include <iostream> #include <cstdio> #include <map> using namespace std; int main() { int i,m,n; char a; map<char,int> letter; for(i=1;i<=26;i++) { letter.insert( map<char,int>::value_type('A'+i-1,i)); letter.insert( map<char,int>::value_type('a'+i-1,-i)); } scanf("%d",&m); getchar(); while(m--) { scanf("%c%d",&a,&n); getchar(); cout<<letter[a]+n<<endl; } return 0; }
确定删除《HDOJ 2055 An easy problem》吗
暂无评论
2023-11-02
2024-04-26
2024-04-25
2024-04-24
2024-04-22
2024-04-21
2024-04-19
2024-04-18
2024-04-17