#include #include #include #include #include using namespace std; int main(int argc, char* argv[]) { map points; ifstream names(argv[1]); string s; while (names >> s) points[s]; cout << "Teilnehmer Punkte:" << endl; int n; while (cin >> s >> n) { if (points.find(s) != points.end()) points[s] += n; else { char c; cout << "Neuer Teilnehmer (j/N)? "; cin >> c; if (c == 'j') points.insert(pair{s, n}); } } for (pair entry: points) cout << setw(10) << entry.first << setw(3) << entry.second << endl; return 0; }