4
bool operator()(pair<int, int> &a, pair<int, int> &b) {5
return alice[a.second] + bob[a.second] < alice[b.second] + bob[b.second];11
int stoneGameVI(vector<int> &aliceValues, vector<int> &bobValues) {14
priority_queue<pair<int, int>, vector<pair<int, int>>, myComp> a, b;16
for (int i = 0; i < aliceValues.size(); i++) {17
a.push({aliceValues[i], i});18
b.push({bobValues[i], i});26
while (a.size() && vis[a.top().second] == 1) a.pop();28
ans1 += a.top().first;29
vis[a.top().second] = 1;33
while (b.size() && vis[b.top().second] == 1) b.pop();35
ans2 += b.top().first;36
vis[b.top().second] = 1;41
if (ans1 == ans2) return 0;42
if (ans1 > ans2) return 1;