(I2
I107
I4
(dp0
Vsquares.%l
p1
(Vsquares.cpp
p2
S'#include<iostream>\r\n#include<cmath>\nusing namespace std;\r\n\r\nstruct Point{\r\n    double x,y;\r\n};\nstruct Square{\r\n    Point center;\r\n\r\n    Point vert;\r\n\r\n    double side;\r\n\r\n    double area;\r\n};\r\n\r\nSquare a[15];\r\nint n;\r\n\nint main()\n{\r\n    cin>>n;\r\n\r\n    double totalArea = 0;\r\n    for(int i = 0; i<n;i++){\r\n        cin >> a[i].center.x >> a[i].center.y;\r\n\r\n        cin >> a[i].vert.x >> a[i].vert.y;\r\n        double x1 = (a[i].center.x - a[i].vert.x);\r\n        double y1 = (a[i].center.y - a[i].vert.y);\r\n        double length = x1*x1 + y1*y1;\r\n\r\n        a[i].side = sqrt(2*length); // sqrt(2* sqrt(length^2);\r\n\r\n        a[i].area = a[i].side * a[i].side;\r\n\r\n        totalArea += a[i].area;\r\n    }\r\n\r\n    cout<<totalArea<<endl;\n    return 0;\n}\n'
p3
tp4
stp5
.