39632023-03-06 19:04:56csicsilla70Radar (70 pont)csharpAccepted 70/70142ms31880 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace radar
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int m = int.Parse(Console.ReadLine());
            int maxi = -1, mini = -1;
            int max = int.MinValue;          
            int min = int.MaxValue;
            int x;
            for (int i = 0; i < n; i++)
            {
                x = int.Parse(Console.ReadLine());
                if (x < min)
                {
                    min = x;
                    mini = i + 1;
                }
            }
            for (int i = 0; i < m; i++)
            {
                x = int.Parse(Console.ReadLine());
                if (x > max)
                {
                    max = x;
                    maxi = i + 1;
                }
            }
            if (min > max)
                Console.WriteLine("IGEN");
            else
            {
                Console.WriteLine("NEM\n" + mini + "\n" + maxi);
            }            
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base70/70
1Accepted0/026ms20152 KiB
2Accepted0/026ms20696 KiB
3Accepted5/526ms20632 KiB
4Accepted5/527ms21384 KiB
5Accepted5/526ms21688 KiB
6Accepted5/525ms22044 KiB
7Accepted5/527ms22272 KiB
8Accepted5/526ms22204 KiB
9Accepted5/527ms22424 KiB
10Accepted5/5118ms30948 KiB
11Accepted5/5116ms31180 KiB
12Accepted5/590ms31004 KiB
13Accepted5/593ms31128 KiB
14Accepted5/5142ms31220 KiB
15Accepted5/5142ms31348 KiB
16Accepted5/5142ms31880 KiB