using System;
using System.Collections.Generic;
namespace DailyChallenge313Easy
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(CheckSubsetSum(new List<int> { 1, 2, 3 }));
Console.WriteLine(CheckSubsetSum(new List<int> { -5, -3, -1, 2, 4, 6 }));
Console.WriteLine(CheckSubsetSum(new List<int> { }));
Console.WriteLine(CheckSubsetSum(new List<int> { -1, 1 }));
Console.WriteLine(CheckSubsetSum(new List<int> { -97364, -71561, -69336, 19675, 71561, 97863 }));
Console.WriteLine(CheckSubsetSum(new List<int> { -53974, -39140, -36561, -23935, -15680, 0 }));
}
static bool CheckSubsetSum(List<int> input)
{
if (input.Count == 0) return false;
for (int i = 0; i < input.Count; i++)
{
if (input[i] == 0) return true;
if (input.Contains(input[i] * -1)) return true;
}
return false;
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKCm5hbWVzcGFjZSBEYWlseUNoYWxsZW5nZTMxM0Vhc3kKewogICAgY2xhc3MgUHJvZ3JhbQogICAgewogICAgICAgIHN0YXRpYyB2b2lkIE1haW4oc3RyaW5nW10gYXJncykKICAgICAgICB7CiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKENoZWNrU3Vic2V0U3VtKG5ldyBMaXN0PGludD4geyAxLCAyLCAzIH0pKTsKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoQ2hlY2tTdWJzZXRTdW0obmV3IExpc3Q8aW50PiB7IC01LCAtMywgLTEsIDIsIDQsIDYgfSkpOwogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZShDaGVja1N1YnNldFN1bShuZXcgTGlzdDxpbnQ+IHsgfSkpOwogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZShDaGVja1N1YnNldFN1bShuZXcgTGlzdDxpbnQ+IHsgLTEsIDEgfSkpOwogICAgICAgICAgICBDb25zb2xlLldyaXRlTGluZShDaGVja1N1YnNldFN1bShuZXcgTGlzdDxpbnQ+IHsgLTk3MzY0LCAtNzE1NjEsIC02OTMzNiwgMTk2NzUsIDcxNTYxLCA5Nzg2MyB9KSk7CiAgICAgICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKENoZWNrU3Vic2V0U3VtKG5ldyBMaXN0PGludD4geyAtNTM5NzQsIC0zOTE0MCwgLTM2NTYxLCAtMjM5MzUsIC0xNTY4MCwgMCB9KSk7CiAgICAgICAgfQoKICAgICAgICBzdGF0aWMgYm9vbCBDaGVja1N1YnNldFN1bShMaXN0PGludD4gaW5wdXQpCiAgICAgICAgewogICAgICAgICAgICBpZiAoaW5wdXQuQ291bnQgPT0gMCkgcmV0dXJuIGZhbHNlOwoKICAgICAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBpbnB1dC5Db3VudDsgaSsrKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpZiAoaW5wdXRbaV0gPT0gMCkgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICBpZiAoaW5wdXQuQ29udGFpbnMoaW5wdXRbaV0gKiAtMSkpIHJldHVybiB0cnVlOyAgICAgICAgICAgICAgICAKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgIH0KICAgIH0KfQ==