#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Hero { int cost; long long power; }; struct Twin { int u, v; long long bonus; }; int main() { int n, C, m; cin >> n >> C >> m; vector<Hero> heroes(n + 1); for (int i = 1; ...