Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <string>
- using namespace std;
- int main () {
- int Q;
- int i;
- string s;
- string command;
- cin >> Q;
- vector <vector <string>> month;
- for (int g = 0; g < Q; ++g) {
- month.assign(31, vector<std::string>(31, " 0 "));
- cin >> command;
- if ( command == "ADD") {
- cin >> i;
- cin >> s;
- month[i].push_back(s);
- } else if ( command == "DUMP") {
- cin >> i;
- for (auto x : month[i]) {
- cout << x << " ";
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement