Submission #1051434

#TimeUsernameProblemLanguageResultExecution timeMemory
1051434deeraPortal (BOI24_portal)C++14
0 / 100
33 ms2484 KiB
#include <bits/stdc++.h> using namespace std; struct Portal { public: int x; int y; }; void print(Portal p) { cout << p.x << " " << p.y << endl; } void solve() { int n; cin >> n; vector<Portal> portals(n); for (int i = 0; i < n; i++) cin >> portals[i].x >> portals[i].y; if (n == 1) return (void)(cout << -1 << endl); if (n == 2) { int a = portals[0].x; int b = portals[0].y; int x = portals[1].x; int y = portals[1].y; cout << (abs(a - x) + 1) * (abs(b - y) + 1) - 1 << endl; } } int main() {solve();}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...