#include<bits/stdc++.h> using namespace std; int calculateTime(string str) { //定义字母对应的按键位置{按键,{位置,按键次数}} unordered_map<char,pair<int,int>> keyboard={ {'a',{1,1}},{'b',{1,2}},{'c',{1,3}}, {'d',{2,1}},{'e',{2,2}},{'f',{2,3}}, {'g',{3,1}},{'h',{3,2}},{'i',{3,3}}, {'j',{4,1}...