SHARE
TWEET

Untitled

a guest Nov 13th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.   long long x1, y1, x2, y2, x3, y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
  8.   long long abx = x2 - x1;
  9.   long long aby = y2 - y1;
  10.   long long acx = x3 - x1;
  11.   long long acy = y3 - y1;
  12.   long long S = abs(abx * acy - aby * acx);
  13.   cout << S / 2;
  14.   if (S % 2 != 0) cout << ".5";
  15.   return 0;
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top