Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <map>
  3. #include <set>
  4. #include <vector>
  5. #include <algorithm>
  6. #include <tuple>
  7.  
  8. using namespace std;
  9.  
  10. struct Date{
  11.     int year;
  12.     int month;
  13.     int day;
  14. };
  15.  
  16. class Database {
  17. public:
  18.  
  19.         bool operator<(const Date& lhs, const Date& rhs) {
  20.             return tie(lhs.year, lhs.month, lhs.day) < tie(rhs.year, rhs.month, rhs.day);
  21.         }
  22.  
  23.         void Print() {
  24.             vector<Date> Dates;
  25.             for (auto item:Ivents) {
  26.                 Dates.push_back(item.first);
  27.             }
  28.            
  29.         }
  30.  
  31. private:
  32.     map<Date, set<string>> Ivents;
  33. };
  34.  
  35. int main() {
  36.  
  37.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement