Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- // 21.04.2019
- class Worker
- {
- string name;
- string date_of_birth;
- string department_name;
- string position;
- string beginning_date;
- public:
- Worker(string name, string date_of_birth, string department_name, string position, string beginning_date)
- {
- this->name = name;
- this->date_of_birth = date_of_birth;
- this->department_name = department_name;
- this->position = position;
- this->beginning_date = beginning_date;
- }
- string GetName()
- {
- return this->name;
- }
- string GetDateOfBirth()
- {
- return this->date_of_birth;
- }
- string GetDepartmentName()
- {
- return this->department_name;
- }
- string GetPosition()
- {
- return this->position;
- }
- string GetBeginningDate()
- {
- return this->beginning_date;
- }
- };
- /*string GetString(string current, int position, int symbols)
- {
- return current.substr(position, symbols);
- }
- bool CompareWorkers(Worker first_worker, Worker second_worker)
- {
- string first_worker_date = first_worker.GetBeginningDate();
- string second_worker_date = second_worker.GetBeginningDate();
- string first_worker_year = GetString(first_worker_date, 5, 5);
- string second_worker_year = GetString(second_worker_date, 5, 5);
- string first_worker_month = GetString(first_worker_date, 3, 2);
- string second_worker_month = GetString(second_worker_date, 3, 2);
- string first_worker_day = GetString(first_worker_date, 0, 2)
- return Convert(first_worker.beginning_date) < Convert(second_worker.beginning_date);
- }*/
- void Solve()
- {
- vector<Worker> workers;
- int n;
- cin >> n;
- for (int i = 0; i < n; i++)
- {
- string name;
- string date_of_birth;
- string department_name;
- string position;
- string beginning_date;
- cin >> name >> date_of_birth >> department_name >> position >> beginning_date;
- Worker current_worker(name, date_of_birth, department_name, position, beginning_date);
- workers.push_back(current_worker);
- }
- }
- int main()
- {
- Solve();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement