Submission #420535

#TimeUsernameProblemLanguageResultExecution timeMemory
420535JvThunderIzvanzemaljci (COI21_izvanzemaljci)C++14
0 / 100
1 ms328 KiB
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fir first #define sec second typedef long long ll; using namespace std; int n,k; void solve() { cin >> n >> k; int mnx,mxx,mny,mxy; for(int i=0;i<n;i++) { int x,y; cin >> x >> y; if(i==0) { mnx = mxx = x; mny = mxy = y; } else { mnx = min(mnx,x); mxx = max(mxx,x); mny = min(mny,y); mxy = max(mxy,y); } } cout << mnx << " " << mny << " " << max(mxx-mnx,mxy-mny) << endl; return; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int tc=1; //cin>>tc; for(int i=1;i<=tc;i++) solve(); return 0; }

Compilation message (stderr)

izvanzemaljci.cpp: In function 'void solve()':
izvanzemaljci.cpp:33:56: warning: 'mxy' may be used uninitialized in this function [-Wmaybe-uninitialized]
   33 |     cout << mnx << " " << mny << " " << max(mxx-mnx,mxy-mny) << endl;
      |                                                     ~~~^~~~
izvanzemaljci.cpp:33:56: warning: 'mny' may be used uninitialized in this function [-Wmaybe-uninitialized]
izvanzemaljci.cpp:33:48: warning: 'mxx' may be used uninitialized in this function [-Wmaybe-uninitialized]
   33 |     cout << mnx << " " << mny << " " << max(mxx-mnx,mxy-mny) << endl;
      |                                             ~~~^~~~
izvanzemaljci.cpp:33:48: warning: 'mnx' may be used uninitialized in this function [-Wmaybe-uninitialized]
#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...