Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.69 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <vector>
  4. #include <string>
  5. #include <math.h>
  6. #include <algorithm>
  7. #include <map>
  8. #include <set>
  9. #include <functional>
  10. #include <unordered_map>
  11.  
  12.  
  13. #define sz(x) ((int64)x.size())
  14. #define all(x) (x).begin(), (x).end()
  15. #define pb(x) push_back(x)
  16. #define mp(x, y) make_pair(x, y)
  17.  
  18. typedef long long int64;
  19.  
  20. using namespace std;
  21.  
  22. int Rows;
  23. int Columns;
  24. int D;
  25. int T;
  26. int Load;
  27.  
  28. int P;
  29. vector<int> Weight;
  30.  
  31. struct Warehouse {
  32.     int X;
  33.     int Y;
  34.     vector<int> Products = vector<int>(P, 0);
  35. };
  36.  
  37. using Order = Warehouse;
  38.  
  39. int W;
  40. vector<Warehouse> Warehouses;
  41.  
  42. int C;
  43. vector<Order> Orders;
  44.  
  45. struct Drone {
  46.     int X;
  47.     int Y;
  48. };
  49.  
  50. vector<Drone> Drones;
  51.  
  52. int main() {
  53.     freopen("input.txt", "rt", stdin);
  54.     freopen("output.txt", "wt", stdout);
  55.  
  56.     cin >> Rows >> Columns >> D >> T >> Load;
  57.  
  58.     cin >> P;
  59.     Weight.assign(P, 0);
  60.     for (int i = 0; i < P; ++i) cin >> Weight[i];
  61.  
  62.     cin >> W;
  63.     for (int i = 0; i < W; ++i) {
  64.         Warehouse warehouse;
  65.         cin >> warehouse.X >> warehouse.Y;
  66.         for (int j = 0; j < P; ++j) cin >> warehouse.Products[j];
  67.         Warehouses.pb(warehouse);
  68.     }
  69.  
  70.     cin >> C;
  71.     for (int i = 0; i < C; ++i) {
  72.         Order order;
  73.         cin >> order.X >> order.Y;
  74.         int L;
  75.         cin >> L;
  76.         for (int j = 0; j < L; ++j) {
  77.             int product;
  78.             cin >> product;
  79.             ++order.Products[product];
  80.         }
  81.         Orders.pb(order);
  82.     }
  83.  
  84.     for (int i = 0; i < D; ++i) {
  85.         Drone drone;
  86.         drone.X = Warehouses[0].X;
  87.         drone.Y = Warehouses[0].Y;
  88.         Drones.pb(drone);
  89.     }
  90.  
  91.     return 0;
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement