48692023-04-04 11:06:24czitaNegáló rendezés (55 pont)csharpWrong answer 14/55112ms55180 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace negalorendezes
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            Dictionary<long, long> m = new Dictionary<long, long>();
            long mini = 100001;
            
            long[] a = Console.ReadLine().Split().Select(long.Parse).ToArray();
            for (int i = 0; i < n; i++)
            {
                if (!m.ContainsKey(a[i]))
                {
                    m.Add(a[i], 0);
                }
                m[a[i]]++;
                mini = Math.Min(mini, a[i]);
            }
            long mod = 1000000007,db=1;
            foreach (var item in m)
            {
                if (item.Key!=mini)
                {
                    db *= (item.Value + 1) % mod;
                }
            }
            Console.WriteLine(db);
            Console.ReadKey();
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base14/55
1Accepted0/034ms22252 KiB
2Wrong answer0/0104ms45176 KiB
3Accepted2/232ms22732 KiB
4Accepted2/235ms23016 KiB
5Accepted2/235ms23432 KiB
6Accepted2/235ms23620 KiB
7Accepted3/335ms24052 KiB
8Wrong answer0/235ms24124 KiB
9Wrong answer0/339ms25476 KiB
10Wrong answer0/3107ms53284 KiB
11Wrong answer0/3112ms55180 KiB
12Accepted3/397ms41652 KiB
13Wrong answer0/3100ms41720 KiB
14Wrong answer0/3107ms45976 KiB
15Wrong answer0/3101ms42436 KiB
16Wrong answer0/3104ms48864 KiB
17Wrong answer0/3103ms48068 KiB
18Wrong answer0/3105ms45144 KiB
19Wrong answer0/3107ms46712 KiB
20Wrong answer0/3103ms46532 KiB
21Wrong answer0/396ms43292 KiB
22Wrong answer0/3100ms42840 KiB