/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
int diff = 0;
for (long seed = 0 ; seed != 1000 ; seed++) {
List<Integer> one = make();
List<Integer> two = make();
boolean same = true;
for (int i = 0 ; i != 52 ; i++) {
if (one.get(i).equals(two.get(i))) {
continue;
}
same = false;
break;
}
if (!same) {
diff++;
System.
out.
println("Different when seed="+seed
); }
}
System.
out.
println("Number of differences: "+diff
); }
public static List<Integer> make() {
List<Integer> items = new ArrayList<>();
for (int i = 0 ; i != 52 ; i++) {
items.add(i);
}
return items;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWludCBkaWZmID0gMDsKCQlmb3IgKGxvbmcgc2VlZCA9IDAgOyBzZWVkICE9IDEwMDAgOyBzZWVkKyspIHsKCQkJUmFuZG9tIHJuZE9uZSA9IG5ldyBSYW5kb20oc2VlZCk7CgkJCUxpc3Q8SW50ZWdlcj4gb25lID0gbWFrZSgpOwoJCQlDb2xsZWN0aW9ucy5zaHVmZmxlKG9uZSwgcm5kT25lKTsKCQkJUmFuZG9tIHJuZFR3byA9IG5ldyBSYW5kb20oc2VlZCk7CgkJCUxpc3Q8SW50ZWdlcj4gdHdvID0gbWFrZSgpOwoJCQlDb2xsZWN0aW9ucy5zaHVmZmxlKHR3bywgcm5kVHdvKTsKCQkJ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