Advertisement
Ankit_132

B

Sep 2nd, 2023
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1.  
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin>>n;
  9.  
  10.     vector<array<int, 4>> va(n);
  11.     for(auto &[a, b, c, d]: va)
  12.         cin>>a>>b>>c>>d;
  13.  
  14.     int ans = 0;
  15.  
  16.     for(int i=0; i<=100; i++)
  17.     {
  18.         for(int j=0; j<=100; j++)
  19.         {
  20.             int f = 0;
  21.             for(auto [a, b, c, d]: va)
  22.                 f |= (a<=i && b>i && c<=j && d>j);
  23.  
  24.             ans += f;
  25.         }
  26.     }
  27.  
  28.     cout<<ans<<"\n";
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement