Pagini recente » Cod sursa (job #701907) | Istoria paginii runda/miada/clasament | Cod sursa (job #2173405) | Monitorul de evaluare | Cod sursa (job #2067742)
#include <bits/stdc++.h>
using namespace std;
long double sol, a, b, x, y, a1, b1;
int n;
int main()
{
ifstream fin ("aria.in");
ofstream fout ("aria.out");
fin >> n >> x >> y;--n;
a1 = x; b1 = y;
while(n--){
a = x; b = y;
fin >> x >> y;
sol += (a*y-b*x);
}
sol += (x*b1-a1*y);
fout << fixed << setprecision(7) << abs(sol/2.0) << "\n";
fin.close();
fout.close();
return 0;
}