func_code_string: #include <bits/stdc++.h>   using namespace std;   int blacks(int *pos, int n);   int whites(int *pos, int n);   int main() {     int n;     cin >> n;     int board[100];     for (int i = 0; i < n; i++) {       board[i] = 0;     }     for (int i = 0; i < n / 2; i++) {       int temp;       cin >> temp;       board[temp - 1] = 1;     }     cout << min(blacks(board, n), whites(board, n));   }   int blacks(int *pos, int n) {     int i = 0;     int label = 0;     int result = 0;     while (i < n) {       if (pos[i] == 1) {         result += abs(i - label);         label += 2;       }       i++;     }     return result;   }   int whites(int *pos, int n) {     int i = 0;     int label = 1;     int result = 0;     while (i < n) {       if (pos[i] == 1) {         result += abs(i - label);         label += 2;       }       i++;     }     return result;   }   