Submission #420894

#TimeUsernameProblemLanguageResultExecution timeMemory
420894MetalPowerIzvanzemaljci (COI21_izvanzemaljci)C++14
5 / 100
27 ms312 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int N, K; int main(){ ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); cin >> N >> K; if(K == 1){ ll min_x, max_x, min_y, max_y; for(int i = 0; i < N; i++){ ll x, y; cin >> x >> y; if(i == 0){ min_x = max_x = x; min_y = max_y = y; }else{ min_x = min(min_x, x); max_x = max(max_x, x); min_y = min(min_y, y); max_y = max(max_y, y); } } cout << min_x << " " << min_y << " " << max(1ll, max(max_x - min_x, max_y - min_y)) << '\n'; }else{ cout << "AC" << '\n'; } }

Compilation message (stderr)

izvanzemaljci.cpp: In function 'int main()':
izvanzemaljci.cpp:31:77: warning: 'max_y' may be used uninitialized in this function [-Wmaybe-uninitialized]
   31 |   cout << min_x << " " << min_y << " " << max(1ll, max(max_x - min_x, max_y - min_y)) << '\n';
      |                                                                       ~~~~~~^~~~~~~
izvanzemaljci.cpp:31:77: warning: 'min_y' may be used uninitialized in this function [-Wmaybe-uninitialized]
izvanzemaljci.cpp:31:62: warning: 'max_x' may be used uninitialized in this function [-Wmaybe-uninitialized]
   31 |   cout << min_x << " " << min_y << " " << max(1ll, max(max_x - min_x, max_y - min_y)) << '\n';
      |                                                        ~~~~~~^~~~~~~
izvanzemaljci.cpp:31:62: warning: 'min_x' 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...