Submission #1002378

#TimeUsernameProblemLanguageResultExecution timeMemory
1002378Valters07Portal (BOI24_portal)C++14
1 / 100
2085 ms2624 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) for(auto y:p) if(x!=y) d1=__gcd(d1,abs(x.fi-y.fi)), d2=__gcd(d2,abs(x.se-y.se)); cout << 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...