题目连接https://odzkskevi.qnssl.com/17da58ae1cdd5a22021b976e9544b652?v=1509701418
水题,处理一下就过了,不会超时
My ugly code
#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
using namespace std;
string s;
char q[205]={"`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./\0"};
int main(){
while(getline(cin,s)){
for(int i=0;i<s.length();i++){
if(s[i] != ' '){
int j;
for(j=0;j<strlen(q);j++){
if(q[j]==s[i]){
break ;
}
}
printf("%c",q[j-1]);
}
else{
printf("%c",s[i]);
}
}
printf("\n");
}
return 0;
}