void test() { AllOne obj; for (int i = 0; i < 10000; ++i) { obj.inc("a"); } for (int i = 0; i < 6050; ++i) { obj.inc("b"); obj.dec("b"); } cout << obj.getMinKey() << endl; cout << obj.getMaxKey() << endl; }
int main() { AllOne a; int n; cin >> n; string cmd, s; for (int i = 0; i < n; i++) { cin >> cmd; if (cmd == "inc") { cin >> s; a.inc(s); } else if (cmd == "dec") {