Pagini recente » Cod sursa (job #2565178) | Cod sursa (job #2083206) | Cod sursa (job #1402212) | Cod sursa (job #1933487) | Cod sursa (job #2552078)
/*
`-/oo+/- ``
.oyhhhhhhyo.`od
+hhhhyyoooos. h/
+hhyso++oosy- /s
.yoooossyyo:``-y`
..----.` ``.-/+:.`
`````..-::/.
`..```.-::///`
`-.....--::::/:
`.......--::////:
`...`....---:::://:
`......``..--:::::///:`
`---.......--:::::////+/`
----------::::::/::///++:
----:---:::::///////////:`
.----::::::////////////:-`
`----::::::::::/::::::::-
`.-----:::::::::::::::-
...----:::::::::/:-`
`.---::/+osss+:`
``.:://///-.
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <iomanip>
#include <map>
#include <cmath>
using namespace std;
const int INF = 2e9;
const int N = 1e5;
pair <long double, long double> p[5 + N];
int main() {
freopen("aria.in", "r", stdin);
freopen("aria.out", "w", stdout);
int n;
long double rez;
cin >> n;
for(int i = 1; i <= n; i++)
cin >> p[i].first >> p[i].second;
p[n + 1] = p[1];
rez = 0;
for(int i = 1; i <= n; i++)
rez += (p[i].first * p[i + 1].second - p[i + 1].first * p[i].second);
if(rez < 0) rez = -rez;
rez /= 2.0;
cout << fixed << setprecision(6) << rez;
return 0;
}