4004 | 2023-03-08 11:32:39 | Tibi23 | Radar (70 pont) | cpp11 | Forditási hiba |
#include <iostream>
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:23:20: error: 'INT_MAX' was not declared in this scope
23 | int minsajat = INT_MAX;
| ^~~~~~~
main.cpp:2:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
1 | #include <iostream>
+++ |+#include <climits>
2 |
main.cpp:34:20: error: 'INT_MIN' was not declared in this scope
34 | int maxellen = INT_MIN;
| ^~~~~~~
main.cpp:34:20: note: 'INT_MIN' is defined in header '<climits>'; did you forget to '#include <climits>'?
Exited with error status 1