| 14272 | 2025-01-10 11:18:57 | Balintbuzi | Aranycipők (45) | cpp17 | Forditási hiba |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace aranycipo
{
internal class Program
{
static void Main(string[] args)
{
int db=int.Parse(Console.ReadLine());
int[] gol=new int[db];
int max = 0;
List<int> list = new List<int>();
List<int>list1=new List<int>();
for (int i = 0; i < db; i++)
{
gol[i]=int.Parse(Console.ReadLine());
if (gol[i]>max)
{
max = gol[i];
}
}
for (int i = 0; i < db; i++)
{
if (gol[i]==max)
{
list.Add(gol[i]);
list1.Add(i + 1);
}
}
Console.WriteLine(max);
Console.WriteLine(list.Count);
for (int i = 0; i < list1.Count; i++)
{
Console.WriteLine(list1[i]);
}
Console.ReadKey();
}
}
}
open /var/local/lib/isolate/404/box/a.out: no such file or directory
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
| ^~~~~~~~