#line 1 "main.cpp" #include #include #include using namespace std; void solve() { int n; cin >> n; vector> ps(n); for (auto& [x, y] : ps) cin >> x >> y; int ans = 0; for (int i = 0; i < n; ++i) { auto [x1, y1] = ps[i]; auto [x2, y2] = ps[(i + 1) % n]; ans += x1 * y2 - x2 * y1; } cout << abs(ans) << "\n"; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; }