daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Oct 12th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2.  
  3. #define ll long long
  4. #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
  5. #define fr(i, n) for(ll i =0;i<n;i++)
  6. #define INF (long long) 1e30
  7. using namespace std;
  8.  
  9. int main() {
  10.     int n;
  11.     cin >> n;
  12.     set<pair<ll,ll>> b;
  13.     set<pair<ll,ll>> e;
  14.     for(int i =0;i<n;i++)
  15.     {
  16.         char r;
  17.         cin>>r;
  18.         if(r == 'B')
  19.         {
  20.             int l ,r;
  21.             cin>>l>>r;
  22.             r = l + r;
  23.             auto j = b.lower_bound({l,10000000});
  24.             bool jf = 0;
  25.             if(j != b.begin())
  26.             {
  27.                 if((*j).second > r)
  28.                 {
  29.                     jf = 1;
  30.                 }
  31.             }
  32.             auto z = e.upper_bound({r,-100000000});
  33.             if(z != e.end())
  34.             {
  35.  
  36.             }
  37.         }
  38.     }
  39.  
  40.  
  41. }
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