40072023-03-08 11:39:27Tibi23Radar (70 pont)cpp11Accepted 70/7093ms5304 KiB
#include <iostream>
#include <climits>

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<<maxsorsz;
   }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base70/70
1Accepted0/03ms1876 KiB
2Accepted0/03ms2068 KiB
3Accepted5/53ms2280 KiB
4Accepted5/53ms2488 KiB
5Accepted5/53ms2736 KiB
6Accepted5/52ms2788 KiB
7Accepted5/53ms2788 KiB
8Accepted5/53ms2812 KiB
9Accepted5/53ms3020 KiB
10Accepted5/537ms4804 KiB
11Accepted5/537ms4984 KiB
12Accepted5/552ms4332 KiB
13Accepted5/552ms4332 KiB
14Accepted5/592ms5068 KiB
15Accepted5/593ms5196 KiB
16Accepted5/592ms5304 KiB