Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.39 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define x first
  3. #define y second
  4. using namespace std;
  5. typedef pair <int, int> Coord;
  6.  
  7. class Action
  8. {
  9. public:
  10.     Coord c;
  11.     int act;
  12. };
  13.  
  14. class Client
  15. {
  16. public:
  17.     Coord from, to;
  18.     int order_time;
  19.     int my_driver = -1;
  20.  
  21.     void Scan()
  22.     {
  23.         cin >> t >> from.x >> from.y >> to.x >> to.y;
  24.     }
  25. };
  26.  
  27. class Driver
  28. {
  29. public:
  30.     vector <Action> seq;
  31.     Coord pos;
  32.     int time;
  33.     int free_space = 1;
  34. };
  35.  
  36. void zero_action()
  37. {
  38.  
  39. }
  40.  
  41. void move_action(vector <Driver> &drivers, vector <Client> &clients, Coord dim, int timer)
  42. {
  43.     for (auto &driver : drivers)
  44.     {
  45.  
  46.     }
  47. }
  48.  
  49. void make_action(vector <Driver> &drivers, vector <Client> &clients, Coord dim, int timer)
  50. {
  51.     move_action(drivers, clients, dim, timer);
  52. }
  53.  
  54. int main()
  55. {                    
  56.     Coord dim;
  57.     cin >> dim.x >> dim.y;    
  58.     int k;
  59.     cin >> k;      
  60.     vector <Driver> drivers(k);
  61.  
  62.     for (auto &driver: drivers)
  63.     {
  64.         cin >> driver.cur.x >> driver.cur.y;
  65.     }
  66.    
  67.     Client client;
  68.     vector <Client> clients;
  69.     int timer = 0;
  70.  
  71.     make_action(drivers, clients, dim, timer);
  72.     client.Scan();
  73.  
  74.     while (client.t != -1)
  75.     {
  76.         timer = client.t;
  77.         clients.push_back(client);
  78.         make_action(drivers, clients, dim, timer);
  79.         client.Scan();
  80.     }
  81.  
  82.     zero_action();     
  83.     return 0;
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement