using System;
public class Sorteio
{
static Random _random = new Random();
public static void Shuffle<T>(T[] array)
{
var random = _random;
for (int i = array.Length; i > 1; i--)
{
int j = random.Next(i);
T tmp = array[j];
array[j] = array[i - 1];
array[i - 1] = tmp;
}
}
public static void Main()
{
string[] array = { "Alaor", "Joseval", "Salustiano", "Gomide", "Castro" };
Shuffle(array);
foreach (string value in array)
{
Console.WriteLine(value);
}
}
}
dXNpbmcgU3lzdGVtOwoKcHVibGljIGNsYXNzIFNvcnRlaW8KewoJc3RhdGljIFJhbmRvbSBfcmFuZG9tID0gbmV3IFJhbmRvbSgpOwoKCXB1YmxpYyBzdGF0aWMgdm9pZCBTaHVmZmxlPFQ+KFRbXSBhcnJheSkKICAgIHsKCQl2YXIgcmFuZG9tID0gX3JhbmRvbTsKCQlmb3IgKGludCBpID0gYXJyYXkuTGVuZ3RoOyBpID4gMTsgaS0tKQoJCXsKCQkgICAgaW50IGogPSByYW5kb20uTmV4dChpKTsKCQkgICAgVCB0bXAgPSBhcnJheVtqXTsKCQkgICAgYXJyYXlbal0gPSBhcnJheVtpIC0gMV07CgkJICAgIGFycmF5W2kgLSAxXSA9IHRtcDsKCQl9CiAgICB9CgkgICAgCglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJc3RyaW5nW10gYXJyYXkgPSB7ICJBbGFvciIsICJKb3NldmFsIiwgIlNhbHVzdGlhbm8iLCAiR29taWRlIiwgIkNhc3RybyIgfTsKCSAgICBTaHVmZmxlKGFycmF5KTsKCSAgICBmb3JlYWNoIChzdHJpbmcgdmFsdWUgaW4gYXJyYXkpCgkgICAgewoJCSAgIENvbnNvbGUuV3JpdGVMaW5lKHZhbHVlKTsKCSAgICB9CQkKCX0KfQ==