Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.48 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 Drone {
  32.     int X;
  33.     int Y;
  34.     vector<int> Products = vector<int>(P, 0);
  35. };
  36.  
  37. using Warehouse = Drone;
  38.  
  39. using Order = Drone;
  40.  
  41. int W;
  42. vector<Warehouse> Warehouses;
  43.  
  44. int C;
  45. vector<Order> Orders;
  46.  
  47. int main() {
  48.     freopen("input.txt", "rt", stdin);
  49.     freopen("output.txt", "wt", stdout);
  50.  
  51.     cin >> Rows >> Columns >> D >> T >> Load;
  52.  
  53.     cin >> P;
  54.     Weight.assign(P, 0);
  55.     for (int i = 0; i < P; ++i) cin >> Weight[i];
  56.  
  57.     cin >> W;
  58.     for (int i = 0; i < W; ++i) {
  59.         Warehouse warehouse;
  60.         cin >> warehouse.X >> warehouse.Y;
  61.         for (int j = 0; j < P; ++i) cin >> warehouse.Products[j];
  62.         Warehouses.pb(warehouse);
  63.     }
  64.  
  65.     cin >> C;
  66.     for (int i = 0; i < C; ++i) {
  67.         Order order;
  68.         cin >> order.X >> order.Y;
  69.         int L;
  70.         cin >> L;
  71.         for (int j = 0; j < L; ++j) {
  72.             int product;
  73.             cin >> product;
  74.             ++order.Products[product];
  75.         }
  76.         Orders.pb(order);
  77.     }
  78.  
  79.     return 0;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement