要求: Given the coordinates of four points in 2D space, return whether the four points could construct a square. The coordinate (x,y) of a point is represented by an integer array with two integers.
考察gcd模板求解最大公约数。由于我是+2去做的,实际上当i=j=1的时候,能构成的分数只能是一种情况,所以最后的res需要减去1!!! #include <iostream>using namespace std;int gcd(int a, int b){return b? gcd(b, a % b): a;}int main(){long long res =