40062023-03-08 11:36:08Tibi23Radar (70 pont)cpp11Wrong answer 40/7097ms4776 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<<maxellen;
   }


    return 0;
}
SubtaskSumTestVerdictTimeMemory
base40/70
1Accepted0/03ms1876 KiB
2Accepted0/03ms2064 KiB
3Accepted5/53ms2316 KiB
4Accepted5/52ms2388 KiB
5Accepted5/53ms2608 KiB
6Accepted5/53ms2820 KiB
7Accepted5/52ms2904 KiB
8Wrong answer0/53ms3036 KiB
9Accepted5/53ms3120 KiB
10Accepted5/537ms4764 KiB
11Accepted5/537ms4644 KiB
12Wrong answer0/550ms3912 KiB
13Wrong answer0/552ms3912 KiB
14Wrong answer0/592ms4644 KiB
15Wrong answer0/597ms4756 KiB
16Wrong answer0/592ms4776 KiB