8 UVA 10790 How Many Points of Intersection?
2015-04-29 21:53
393 查看
第一排第i个点和第二排第j个点相连,在这条线段上会产生(a-i)*(j-1)个交点,
以此类推,推公式即可。
以此类推,推公式即可。
#include<cstdio> #define ll long long ll a,b; int cas=1; int main() { while(~scanf("%d%d",&a,&b)&&(a||b)) printf("Case %d: %lld\n",cas++,a*(a-1)/2*b*(b-1)/2); return 0; }
相关文章推荐
- Uva 10790 - How Many Points of Intersection?
- UVa 10790 - How Many Points of Intersection?
- uva 10790 How Many Points of Intersection?(几何规律)
- UVA 10790 How Many Points of Intersection?
- UVA-10790 How Many Points of Intersection?
- uva 10790 How Many Points of Intersection?(数学)
- uva 10790 - How Many Points of Intersection?
- uva 10790 - How Many Points of Intersection?
- Uva 10790 How Many Points of Intersection?
- UVA 10790 How Many Points of Intersection?
- uva 10790 How Many Points of Intersection?
- uva - 10790 - How Many Points of Intersection?
- uva 10790 How Many Points of Intersection?
- UVA - 10790 How Many Points of Intersection?
- UVA 10790 How Many Points of Intersection?
- UVa 10790 How Many Points of Intersection?
- UVA 10790 - How Many Points of Intersection?
- uva 10790 How Many Points of Intersection?
- UVA 10790 - How Many Points of Intersection?
- UVA - 10790 How Many Points of Intersection?