func_code_string: #include <bits/stdc++.h>   using namespace std;   void inp(long long &n, long long &m, vector<long long> &v,            vector<pair<signed, signed> > &rope) {     cin >> n >> m;     v.resize(n + 1);     rope.resize(m + 1);     for (long long i = 1; i <= n; ++i) {       cin >> v[i];     }     for (long long i = 1; i <= m; ++i) {       cin >> rope[i].first >> rope[i].second;     }   }   void solve() {     long long n, m, res = 0;     vector<long long> v;     vector<pair<signed, signed> > rope;     inp(n, m, v, rope);     for (long long i = 1; i <= m; ++i) {       res += min(v[rope[i].first], v[rope[i].second]);     }     cout << res;   }   signed main() {     ios::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     solve();     return 0;   }   