4005 | 2023-03-08 11:35:34 | Tibi23 | Radar (70 pont) | cpp11 | Compilation error |
#include <iostream>
#include <limits>
using namespace std;
int main()
{
int mdb, edb;
cin>>mdb;
cin>>edb;
int mradar[mdb];
int eradar[edb];
for(int i=0; i<mdb; i++){
cin>>mradar[i];
}
for(int i=0; i<edb; i++){
cin>>eradar[i];
}
int minsajat = INT_MAX;
int minsorsz = -1 ;
for(int i=0; i<mdb; i++){
if(minsajat>mradar[i]){
minsajat=mradar[i];
minsorsz = i+1;
}
}
int maxellen = INT_MIN;
int maxsorsz = -1 ;
for(int i=0; i<edb; i++){
if(maxellen<eradar[i]){
maxellen=eradar[i];
maxsorsz = i+1;
}
}
if(minsajat>maxellen){
cout<<"IGEN";
}
else{
cout<<"NEM"<<endl<<minsorsz<<endl<<maxellen;
}
return 0;
}
exit status 1
main.cpp: In function 'int main()':
main.cpp:24:20: error: 'INT_MAX' was not declared in this scope
24 | int minsajat = INT_MAX;
| ^~~~~~~
main.cpp:3:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
2 | #include <limits>
+++ |+#include <climits>
3 |
main.cpp:35:20: error: 'INT_MIN' was not declared in this scope
35 | int maxellen = INT_MIN;
| ^~~~~~~
main.cpp:35:20: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
Exited with error status 1