Beispiel #1
0
int main() {
    Contacts contacts;
    size_t n;
    cin >> n;
    while (n--) {
        std::string command, parameter;
        cin >> command >> parameter;
        if (command == "add") {
            contacts.insert(parameter);
        } else if (command == "find") {
            cout << contacts.lookup(parameter) << '\n';
        }
    }

    return 0;
}