Cod sursa(job #2221794)
Utilizator | Data | 15 iulie 2018 20:28:21 | |
---|---|---|---|
Problema | Aria | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.2 kb |
#include <fstream>
std::ifstream f("aria.in");main(){long double N,a,b,x,y,X,Y,S=0;f>>N>>a>>b;x=a;for(y=b;--N;S+=x*Y-X*y,x=X,y=Y)f>>X>>Y;S+=x*b-a*y;freopen("aria.out","w",stdout);printf("%.5f",S/2);}