Perl 5 -p, 83 bytes
- Mess: nothing
- Square: 0
- Triangle: 1
- Rectangle: 2
($z)=grep++$$_{"@+"-$_*~-$.
}==$.,0,/$/,-1}{@F<2|$.<2or
$_=$$$$_{"@+"-$_*~-$.}==$.,0,/$/,-1
}{$.<2or$_=$$z{$z>0||$.}?$z%2:2x@F>1&&2x!$z
11 bytes wasted on checking the minimal sizesTry it online!
Perl 5 -p, 83 bytes
- Mess: nothing
- Square: 0
- Triangle: 1
- Rectangle: 2
($z)=grep++$$_{"@+"-$_*~-$.
}==$.,0,/$/,-1}{@F<2|$.<2or
$_=$$z{$z>0||$.}?$z%2:2x!$z
11 bytes wasted on checking the minimal sizes
Perl 5 -p, 83 bytes
- Mess: nothing
- Square: 0
- Triangle: 1
- Rectangle: 2
($z)=grep++$$_{"@+"-$_*~-$.}==$.,0,/$/,-1
}{$.<2or$_=$$z{$z>0||$.}?$z%2:@F>1&&2x!$z
Perl 5 -p, 7983 bytes
- Mess: nothing
- Square: 0
- Triangle: 1
- Rectangle: 2
/$/;($z)=grep++$$_{"@+"-$_*~-$.}==$.,0,
1,-1}{$.<2or$_=$$$$_{"@+"-$_*~-$.
}==$.,0,/$/,-1}{@F<2|$.<2or
$_=$$z{$z>0||$.}?$z%2:2x!$z
11 bytes wasted on checking the minimal sizes
Perl 5 -p, 79 bytes
- Mess: nothing
- Square: 0
- Triangle: 1
- Rectangle: 2
/$/;($z)=grep++$$_{"@+"-$_*~-$.}==$.,0,
1,-1}{$.<2or$_=$$z{$z>0||$.}?$z%2:2x!$z
Perl 5 -p, 83 bytes
- Mess: nothing
- Square: 0
- Triangle: 1
- Rectangle: 2
($z)=grep++$$_{"@+"-$_*~-$.
}==$.,0,/$/,-1}{@F<2|$.<2or
$_=$$z{$z>0||$.}?$z%2:2x!$z
11 bytes wasted on checking the minimal sizes
Perl 5 -p, 79 bytes
- Mess: nothing
- Square: 0
- Triangle: 1
- Rectangle: 2
/$/;($z)=grep++$$_{"@+"-$_*~-$.}==$.,0,
1,-1}{$.<2or$_=$$z{$z>0||$.}?$z%2:2x!$z