75332024-01-09 13:38:15PeterNegáló rendezés (55 pont)cpp17Forditási hiba
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
    
namespace Negáló_rendezés
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] sorozat = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int[] tdb = new int[N + 1]; //tdb = tömb darabszám
            foreach (var item in sorozat)
            {
                tdb[item]++;
            }
            int min = 0;
            while (tdb[min]==0)
            {
                min++;
            }

            int szorzat = 1;
            for (int i = min+1; i <= N; i++)
            {
                if (tdb[i]!=0)
                {
                    szorzat = (szorzat*(tdb[i]+1)%1000000007);
                    
                }
            }


            Console.WriteLine(szorzat);
            Console.ReadKey();
          
        }
    }
}
Forditási hiba
exit status 1
main.cpp:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
main.cpp:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
main.cpp:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
main.cpp:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
main.cpp:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
main.cpp:9:5: error: 'internal' does not name a type
    9 |     internal class Program
      |     ^~~~~~~~
Exited with error status 1