leetcode 223. Rectangle Area
来源:互联网 发布:局域网文件传输软件 编辑:程序博客网 时间:2024/06/05 16:12
class Solution {public: int computeArea(int A, int B, int C, int D, int E, int F, int G, int H) { int x1 = max(A,E),x2=min(C,G); int y2 = min(D,H),y1=max(B,F); int t1 = 0, t2 = 0; if(x1 < x2) t1 = x2-x1; if(y1 < y2) t2 = y2-y1; return (C-A)*(D-B)+(G-E)*(H-F)-t1*t2; }};
0 0
- [leetcode] 223.Rectangle Area
- [leetcode] 223. Rectangle Area
- 223. Rectangle Area LeetCode
- #leetcode# 223. Rectangle Area
- leetcode 223. Rectangle Area
- LeetCode--223. Rectangle Area
- LeetCode *** 223. Rectangle Area
- LeetCode 223. Rectangle Area
- leetcode-223. Rectangle Area
- LeetCode-223.Rectangle Area
- 223.[Leetcode]Rectangle Area
- leetcode 223. Rectangle Area
- 【leetcode】223. Rectangle Area
- [Leetcode]223. Rectangle Area
- LeetCode - 223. Rectangle Area
- LeetCode 223. Rectangle Area
- LeetCode 223. Rectangle Area
- LeetCode 223. Rectangle Area
- mysql-语句
- 【例题】【网络流(费用流)】NKOJ 3738 学号
- 6种常见排序算法(java版)
- [vijos 1204]CoVH之柯南开锁
- 软件设计六大原则
- leetcode 223. Rectangle Area
- JAVA线程与多线程
- Android中Handler的使用方法——在子线程中更新界面
- 控件WebView的使用
- POJ 2891 Strange Way to Express Integers解线性同余方程组(中国剩余定理不互质版)
- bzoj 4008(期望与DP)
- 从应用到内核第0章记录
- java基础学习总结—— java外部类与内部类的关系
- [OpenGL] 动态的水面模拟