This repository has been archived on 2021-11-27. You can view files and clone it, but cannot push or open issues or pull requests.
4 changed files with
41 additions and
0 deletions
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
.dub/
|
|
|
|
|
bin/
|
|
|
|
|
.vscode/
|
|
|
|
|
autocreation-dub.sh
|
|
|
|
|
|
|
|
@ -0,0 +1,15 @@
|
|
|
|
|
.dub
|
|
|
|
|
docs.json
|
|
|
|
|
__dummy.html
|
|
|
|
|
docs/
|
|
|
|
|
/example_4
|
|
|
|
|
example_4.so
|
|
|
|
|
example_4.dylib
|
|
|
|
|
example_4.dll
|
|
|
|
|
example_4.a
|
|
|
|
|
example_4.lib
|
|
|
|
|
example_4-test-*
|
|
|
|
|
*.exe
|
|
|
|
|
*.o
|
|
|
|
|
*.obj
|
|
|
|
|
*.lst
|
|
|
|
@ -0,0 +1,9 @@
|
|
|
|
|
{
|
|
|
|
|
"authors": [
|
|
|
|
|
"alexander"
|
|
|
|
|
],
|
|
|
|
|
"description": "Массивы и ассоциативные массивы. Работа со словарем.",
|
|
|
|
|
"license": "proprietary",
|
|
|
|
|
"name": "example_4",
|
|
|
|
|
"targetPath": "bin"
|
|
|
|
|
}
|
|
|
|
@ -0,0 +1,16 @@
|
|
|
|
|
import std.stdio, std.string;
|
|
|
|
|
|
|
|
|
|
void main()
|
|
|
|
|
{
|
|
|
|
|
size_t [string] dictionary;
|
|
|
|
|
foreach (line; stdin.byLine)
|
|
|
|
|
{
|
|
|
|
|
foreach (word; strip(line).split)
|
|
|
|
|
{
|
|
|
|
|
if (word in dictionary) continue;
|
|
|
|
|
auto newID = dictionary.length;
|
|
|
|
|
dictionary[word.idup] = newID;
|
|
|
|
|
writeln(newID, '\t', word);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|