Submission #1002381

#TimeUsernameProblemLanguageResultExecution timeMemory
1002381Valters07Portal (BOI24_portal)C++14
1 / 100
19 ms2680 KiB
#include <bits/stdc++.h> #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") #define fio ios_base::sync_with_stdio(0);cin.tie(0); #define en cin.close();return 0; #define ll long long #define pb push_back #define fi first #define se second using namespace std; int main() { fio // ifstream cin("in.in"); int n; cin >> n; if(n<=2) return cout << -1, 0; pair<int,int> p[n]; for(auto &x:p) cin >> x.fi >> x.se; int d1 = 0, d2 = 0; for(auto x:p) d1=__gcd(d1,abs(p[0].fi-x.fi)), d2=__gcd(d2,abs(p[0].se-x.se)); cout << 1ll*d1*d2; return 0; }
#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...