哈曼顿距离
#include<iostream>
#include<cmath>
using namespace std;
int main() {
double x, sum = 0;
char a;
cin >> a;
for (int i = 0; i < 12; i++) {
for (int j = 0; j < 12; j++) {
cin >> x;
if (i+11-j<=10) {//i<j更简单
sum += x;
}
}
}
printf("%.1lf", a == 'S' ? sum : sum / 66);
return 0;
}