Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. #include <algorithm>
  2. #include <vector>
  3. #include <iostream>
  4. #include <set>
  5. #include "prettyprint.hpp"
  6. using namespace std;
  7.  
  8. #define rep(i, a, b) for(int i = a; i < (b); ++i)
  9. #define trav(a, x) for(auto& a : x)
  10. #define all(x) x.begin(), x.end()
  11. #define sz(x) (int)(x).size()
  12. #define endl '\n'
  13. typedef long long ll;
  14. typedef pair<int, int> ii;
  15. typedef vector<int> vi;
  16.  
  17. struct TrafficLight {
  18. int R,G,D;
  19.  
  20. TrafficLight(int D, int R, int G) {
  21. this->D = D;
  22. this->R = R;
  23. this->G = G;
  24. }
  25.  
  26. TrafficLight() {
  27. }
  28. };
  29.  
  30. int main() {
  31. cin.sync_with_stdio(0);
  32.  
  33. int N, L;
  34. cin >> N >> L;
  35.  
  36. vector<TrafficLight> trafficLights;
  37.  
  38. for (int i = 0; i < N; i++) {
  39. int D, R, G;
  40. cin >> D >> R >> G;
  41.  
  42. TrafficLight TL{D, R, G};
  43. trafficLights.push_back(TL);
  44. }
  45.  
  46. for (auto TL : trafficLights) {
  47. cout << TL.D << endl;
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement