Submission #1191483
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace codefestival_2016_qualA_B { class Program { static void Main(string[] args) { int ans = 0; int n = int.Parse(Console.ReadLine()); int[] a = Console.ReadLine().Split(int.Parse).ToArray(); for (int i = 0; i < n; i++) { if (i + 1 == a[a[i] - 1]) { ans++; } }Console.Write(ans/2); } } }
Submission Info
Submission Time | |
---|---|
Task | B - Friendly Rabbits |
User | rayhotate |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 609 Byte |
Status | CE |
Compile Error
./Main.cs(15,42): error CS1502: The best overloaded method match for `string.Split(params char[])' has some invalid arguments /usr/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error) ./Main.cs(15,52): error CS1503: Argument `#1' cannot convert `method group' expression to type `char[]'