Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1.  
  2.  
  3. #include <iostream>
  4. #include <vector>
  5. #include <string>
  6. using namespace std;
  7.  
  8.  
  9. int main () {
  10. int Q;
  11. int i;
  12. string s;
  13. string command;
  14. cin >> Q;
  15. vector <vector <string>> month;
  16. for (int g = 0; g < Q; ++g) {
  17. month.assign(31, vector<std::string>(31, " 0 "));
  18. cin >> command;
  19. if ( command == "ADD") {
  20. cin >> i;
  21. cin >> s;
  22. month[i].push_back(s);
  23.  
  24. } else if ( command == "DUMP") {
  25. cin >> i;
  26. for (auto x : month[i]) {
  27. cout << x << " ";
  28. }
  29. }
  30. }
  31.  
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement