Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
9
Task/Anagrams/Component-Pascal/anagrams-2.component
Normal file
9
Task/Anagrams/Component-Pascal/anagrams-2.component
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import std.stdio, std.algorithm, std.range, std.string, std.exception;
|
||||
|
||||
void main() {
|
||||
string[][const ubyte[]] an;
|
||||
foreach (w; "unixdict.txt".File.byLine(KeepTerminator.no))
|
||||
an[w.dup.representation.sort().release.assumeUnique] ~= w.idup;
|
||||
immutable m = an.byValue.map!q{ a.length }.reduce!max;
|
||||
writefln("%(%s\n%)", an.byValue.filter!(ws => ws.length == m));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue