SHARE
TWEET

Untitled

a guest Oct 22nd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n;
  9.     cin >> n;
  10.     vector <pair <char, pair <int, int>>> s(n);
  11.     for(int i = 0; i < n; i++)
  12.     {
  13.         char a; int o, l;
  14.         cin >> a >> o >> l;
  15.         cout << a << " " << o << " " << l << endl;
  16.         s[i] = make_pair(a, make_pair(o, l));
  17.         cout << s[i].first << " " << s[i].second.first << " " << s[i].second.second << endl;
  18.     }
  19.     int sf = 0, sm = 0, x = 0;
  20.     for(int i = 1; i <= 366; i++)
  21.     {
  22.         for(int j = 0; j < n; j++)
  23.         {
  24.             int p, q;
  25.             s[j].second.first = p; s[j].second.second = q;
  26.             cout << j << " " << p << " " << q << endl;
  27.             if((p <= i) and (i <= q))
  28.             {
  29.                 if(s[j].first == 'F') sf++;
  30.                 else sm++;
  31.             }
  32.         }
  33.         if((sf == sm) and (sf > x)) x = sf;
  34.         sf = 0; sm = 0;
  35.     }
  36.     cout << x;
  37.     return 0;
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top