Submission #414484

#TimeUsernameProblemLanguageResultExecution timeMemory
414484medmdgIzvanzemaljci (COI21_izvanzemaljci)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define ll long long #define endl "\n" using namespace std; const M=1000000009; struct pt{ ll x,y; }; int main() { ll n,k; cin>>n>>k; pt a[n]; ll lx=M,ly=M,hx=-M,hy=-M; for(int i=0;i<n;i++){ cin>>a[i].x>>a[i].y; hx=max(hx,a[i].x); hy=max(hy,a[i].y); ly=min(ly,a[i].y); lx=min(lx,a[i].x); } if(k<3){ if(k==1){ cout<<lx<<" "<<ly<<" "<<max(hx-lx,hy-ly)<<endl; return 0; } /*cout<<lx<<" "<<ly<<" "<<min(hx-lx,hy-ly)<<endl; if(hx-lx==)*/ } }

Compilation message (stderr)

izvanzemaljci.cpp:5:7: error: 'M' does not name a type
    5 | const M=1000000009;
      |       ^
izvanzemaljci.cpp: In function 'int main()':
izvanzemaljci.cpp:13:11: error: 'M' was not declared in this scope
   13 |     ll lx=M,ly=M,hx=-M,hy=-M;
      |           ^
izvanzemaljci.cpp:16:9: error: 'hx' was not declared in this scope; did you mean 'lx'?
   16 |         hx=max(hx,a[i].x);
      |         ^~
      |         lx
izvanzemaljci.cpp:17:9: error: 'hy' was not declared in this scope
   17 |         hy=max(hy,a[i].y);
      |         ^~
izvanzemaljci.cpp:18:9: error: 'ly' was not declared in this scope; did you mean 'lx'?
   18 |         ly=min(ly,a[i].y);
      |         ^~
      |         lx
izvanzemaljci.cpp:23:28: error: 'ly' was not declared in this scope; did you mean 'lx'?
   23 |             cout<<lx<<" "<<ly<<" "<<max(hx-lx,hy-ly)<<endl;
      |                            ^~
      |                            lx
izvanzemaljci.cpp:23:41: error: 'hx' was not declared in this scope; did you mean 'lx'?
   23 |             cout<<lx<<" "<<ly<<" "<<max(hx-lx,hy-ly)<<endl;
      |                                         ^~
      |                                         lx
izvanzemaljci.cpp:23:47: error: 'hy' was not declared in this scope
   23 |             cout<<lx<<" "<<ly<<" "<<max(hx-lx,hy-ly)<<endl;
      |                                               ^~