제출 #1028138

#제출 시각아이디문제언어결과실행 시간메모리
1028138mdn2002Portal (BOI24_portal)C++17
0 / 100
37 ms1116 KiB
/* Mayoeba Yabureru */ #include<bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<int> x(n), y(n); for (int i = 0; i < n; i ++) cin >> x[i] >> y[i]; if (n == 1) { cout << -1 << endl; return; } if (x[0] == x[1] || y[0] == y[1]) cout << -1; else cout << (max(x[0], x[1]) - min(x[0], x[1]) - 1) * (max(y[0], y[1]) - min(y[0], y[1]) - 1); } int main() { int T = 1; for (int I = 0; I < T; I ++){ 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...