Submission #520516

#TimeUsernameProblemLanguageResultExecution timeMemory
520516VimmerIzvanzemaljci (COI21_izvanzemaljci)C++14
5 / 100
26 ms1876 KiB
#include <bits/stdc++.h> #define in(x) freopen(x, "r", stdin) #define out(x) freopen(x, "w", stdout) //#pragma GCC optimize("Ofast") //#pragma GCC optimize("unroll-loops") //#pragma GCC optimize("-O3") #define F first #define S second #define PB push_back #define M ll(1e9 + 7) #define sz(x) (ll)x.size() #define N 1000500 #define pri(x) cout << x << endl #define endl '\n' #define all(x) (x).begin(), (x).end() #define _ << " " << using namespace std; //typedef tree <ll, null_type, less_equal <ll> , rb_tree_tag, tree_order_statistics_node_update> ordered_set; //using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef short int si; typedef unsigned long long ull; ll f[2][(1 << 12)]; int main() { istream::sync_with_stdio(0); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll n, k; cin >> n >> k; ll x[n], y[n]; for (ll i = 0; i < n; i++) cin >> x[i] >> y[i]; if (k == 1) { ll mxx = -1e18, mnx = 1e18, mxy = -1e18, mny = 1e18; for (int i = 0; i < n; i++) { mxx = max(mxx, x[i]); mxy = max(mxy, y[i]); mnx = min(mnx, x[i]); mny = min(mny, y[i]); } ll len = max(mxx - mnx, mxy - mny); pri(mnx _ mny _ max(1ll, len)); exit(0); } assert(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...