func_code_string: #include <bits/stdc++.h>   using namespace std;   inline void pisz(int n) { printf( %d n , n); }   const int fx[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};   const int fxx[8][2] = {{0, 1}, {0, -1}, {1, 0},  {-1, 0},                          {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};   template <typename T, typename TT>   ostream& operator<<(ostream& s, pair<T, TT> t) {     return s <<  (  << t.first <<  ,  << t.second <<  ) ;   }   template <typename T>   ostream& operator<<(ostream& s, vector<T> t) {     for (int i = 0; i < ((int)((t).size())); i++) s << t[i] <<    ;     return s;   }   int main() {     int n;     string A;     int cursor;     cin >> n >> cursor >> A;     cursor--;     n--;     cursor = min(cursor, n - cursor);     int middle = n / 2;     int leftmost = cursor, rightmost = cursor;     for (int i = cursor; i <= middle; i++)       if (A[i] != A[n - i]) rightmost = i;     for (int i = cursor; i >= 0; i--)       if (A[i] != A[n - i]) leftmost = i;     int vertical_moves = 0;     for (int i = leftmost; i <= rightmost; i++)       vertical_moves += min(abs(A[i] - A[n - i]), 26 - abs(A[i] - A[n - i]));     int horizontal_moves = min((cursor - leftmost) + (rightmost - leftmost),                                (rightmost - cursor) + (rightmost - leftmost));     int total_moves = horizontal_moves + vertical_moves;     cout << total_moves;     return 0;   }   