fork(2) download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <algorithm>
  4. #include <vector>
  5. #include <cstring>
  6. #include <deque>
  7. #include <time.h>
  8. #include <stack>
  9. #include <stdio.h>
  10. #include <map>
  11. #include <set>
  12. #include <string>
  13. #include <fstream>
  14. #include <queue>
  15. #define mp make_pair
  16. #define pb push_back
  17. #define PI 3.14159265358979323846
  18. #define MOD 1000000007
  19. #define INF ((ll)1e+15)
  20. #define x1 fldgjdflgjhrthrl
  21. #define x2 fldgjdflgrtyrtyjl
  22. #define y1 fldggfhfghjdflgjl
  23. #define y2 ffgfldgjdflgjl
  24. typedef long long ll;
  25. using namespace std;
  26. ll i,n,m,x1,y1,x2,y2;
  27.  
  28. int main()
  29. {
  30. ll ans = 0;
  31. cin >> n;
  32. for (i = 0; i < n; i++)
  33. {
  34. cin >> x1 >> y1 >> x2 >> y2;
  35. ans += (x2-x1+1)*(y2-y1+1);
  36. }
  37. cout << ans << endl;
  38. return 0;
  39. }
  40.  
Success #stdin #stdout 0s 3100KB
stdin
Standard input is empty
stdout
0