Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int s[1001][1001], suma[1001], n, v[1001], k = 3, m = 2;
- vector<string>text;
- int main()
- {
- freopen("test.in", "r", stdin);
- freopen("text.out", "w", stdout);
- unordered_map<string, int>aparitii;
- string propozitie;
- while(getline(cin, propozitie))
- {
- string cuvant;
- stringstream linie(propozitie);
- while(getline(linie, cuvant, ' '))
- {
- string nota = cuvant.substr(0, cuvant.length()-1);
- aparitii[nota]++;
- }
- }
- for(const auto it : aparitii)
- cout << it.second << ' ';
- //map<string, pair<string, string> > dictionar;
- //dictionar["do"] = {"re","si"};
- //dictionar.insert({"do", {"re","si"}});
- //cout << dictionar["do"].first;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement