https://www.acmicpc.net/problem/2108 제출 코드#include #include #include #include using namespace std;bool comp(pair& a, pair& b){ if (a.second == b.second) return a.first b.second;}int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); vector v; int n, input, sum = 0; cin >> n; for (int i = 0; i > input; sum += input; v.push_back(input); }..