1487 물건 팔기 문제 풀이 #include #include #include using namespace std; void fast_io(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int main(void) { fast_io(); long long n, max = 0, idx = 0; vector v; cin >> n; int arr[51]; for (int i = 0; i > a >> b; v.push_back(make_pair(a, b)); } sort(v.begin(), v.end()); int maxp = 0; int tmaxp = 0; for (int i ..