using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.IO; class Myon { public Myon() { } public static int Main() { new Myon().calc(); return 0; } int T = 10; void calc() { Random r = new Random(2); List l = new List(); while (true) { l.Add(r.Next(0, (1 << 20))); if (check(l)) break; } Console.WriteLine(l.Count); foreach (var item in l) { for (int j = 0; j < 10; j++) { Console.Write((((item >> (j * 2)) & 3) + 1) + " "); } Console.WriteLine(); } } bool check(List l) { Dictionary dic = new Dictionary(); for (int i = 0; i < (1 << 20); i++) { ulong p = 0; foreach (var item in l) { int count = 0; for (int j = 0; j < 10; j++) { if (((item >> (j * 2)) & 3) == ((i >> (j * 2)) & 3)) count++; } p <<= 4; p += (ulong)count; } if (dic.ContainsKey(p)) return false; dic[p] = true; } return true; } }