链接:http://acm.hdu.edu.cn/showproblem.php?pid=1280
题意:给出一系列对角线点,看能形成多少个正方形
思路:水题。。看成一个大的四边形,看哪些单元包括在里面
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
int units[110][110];
int main()
{
int flag = 1;
while(flag)
{
int a,b,c,d,sum = 0;
for(int i=0; i<=100; i++)
for(int j=0; j<=100; j++)
units[i][j] = 0;
while(scanf("%d%d%d%d",&a,&b,&c,&d))
{
if(a == -1 && b == -1 && c == -1 && d == -1)
break;
if(a == -2 && b == -2 && c == -2 &