Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- long long x1, y1, x2, y2, x3, y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
- long long abx = x2 - x1;
- long long aby = y2 - y1;
- long long acx = x3 - x1;
- long long acy = y3 - y1;
- long long S = abs(abx * acy - aby * acx);
- cout << S / 2;
- if (S % 2 != 0) cout << ".5";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement