Pagini recente » Cod sursa (job #2917142) | Cod sursa (job #1494026) | Cod sursa (job #3268673) | Cod sursa (job #3144802) | Cod sursa (job #2552059)
/*
`-/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 <map>
#include <cmath>
using namespace std;
const int INF = 2e9;
const int N = 1e5;
pair <double, double> p[5 + N];
int main() {
freopen("aria.in", "r", stdin);
freopen("aria.out", "w", stdout);
int n;
long double rez;
scanf("%d", &n);
for(int i = 1; i <= n; i++)
scanf("%lf%lf", &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);
printf("%.6lf", fabs(rez / 2.0));
return 0;
}