Cod sursa(job #2432838)
Utilizator | Teodor Matei Shay | Data | 25 iunie 2019 11:45:48 |
---|---|---|---|
Problema | Aria | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.41 kb |
#include <fstream>
#include <assert.h>
#include <iomanip>
int main() {
std::ifstream cin("aria.in");
std::ofstream cout("aria.out");
std::ios::sync_with_stdio(false);
int n, x, y, x_1, y_1, sum = 0;
cin >> n;
assert(1 <= n && n <= 100000);
for (; n ; --n) {
cin >> x >> y;
cin >> x_1 >> y_1;
sum += (x * y_1 - x_1 * y);
}
cout << std::fixed << std::setprecision(5) << sum / 2 << '\n';
return 0;
}