标签:syn std set ++ names ack php ble ase
///@author Sycamore ///@date 8/8/2017 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; while (cin >> n >> k) { char ch; int t; multiset<int>s; while (n--) { cin >> ch; if (ch == ‘I‘) { cin >> t; s.insert(t); if (s.size() > k)s.erase(s.begin()); } else cout <<*s.begin()<<endl ; } } return 0; }
HDU 4006: The kth great number
标签:syn std set ++ names ack php ble ase
原文地址:http://www.cnblogs.com/zjnu/p/7308945.html