Untitled
unknown
plain_text
2 years ago
602 B
2
Indexable
#include <iostream> #include <fstream> #include <vector> #include <string> #include <iomanip> using namespace std; float func(float a,float b) { return 0; } int main(){ ifstream in("input.txt"); ofstream out("result.txt"); pair <int, int> A; pair <int, int> B; pair <int, int> C; pair <int, int> D; in >> A.first >> A.second; in >> B.first >> B.second; in >> C.first >> C.second; in >> D.first >> D.second; float W, H; W = D.first - A.first; H = B.second - A.second; out <<W*H << ' ' << W * 2 + H * 2 << '\n' << A.first + W / 2.0 << ' ' << A.second + H / 2.0; }
Editor is loading...