naranja #4737(2007/12/11 00:19 GMT) [ D ] Rating0/0=0.00
普通に。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
import std.stdio; import std.string; void main(){ string[] amida = ["A B C D E", "| | |-| |", "|-| | |-|", "| |-| |-|", "|-| |-| |", "|-| | | |"]; auto pos = cast(char[])amida[0].dup; foreach(s; amida[1..$]){ foreach(i, c; s[0..($ - 1)]){ if(c == '-'){ auto tmp = pos[i - 1]; pos[i - 1] = pos[i + 1]; pos[i + 1] = tmp; } } } amida ~= cast(string)pos; writefln(amida.join("\n")); }
Rating0/0=0.00-0+
[ reply ]
naranja
#4737()
[
D
]
Rating0/0=0.00
普通に。
Rating0/0=0.00-0+
[ reply ]