fork download
  1. #include<iostream>
  2. #include<map>
  3. #include<string>
  4. #include<vector>
  5. using namespace std;
  6. int main() {
  7. map<string, map<string, map<string, vector<int>>>> Szkola;
  8. Szkola["3TP"]["Daber"]["Informatyka"] = {5, 5};
  9. Szkola["4TP"]["Milosz"]["Polski"] = {6, 6, 6};
  10.  
  11. for (auto s : Szkola) {
  12. cout << s.first << endl;
  13. for (auto uczen : s.second) {
  14. cout << uczen.first << endl;
  15. for (auto przedmiot : uczen.second) {
  16. cout << przedmiot.first << endl;
  17. for (auto ocena : przedmiot.second) {
  18. cout << ocena << " ";
  19. }
  20. cout<<endl;
  21. }
  22. }
  23. }
  24. }
  25.  
  26.  
  27.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
3TP
Daber
Informatyka
5 5 
4TP
Milosz
Polski
6 6 6