[過去ログ] プログラミングのお題スレ Part13 (1002レス)
上下前次1-新
抽出解除 レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
459(1): 2019/03/02(土)11:17:11.62 ID:xuPe2CJ9(2/4)調 AAS
俺は等幅で見てくれってあったら、設定を変えるんじゃなくてメモ帳にコピペして見るけどなー
498: 2019/03/04(月)19:12:27.62 ID:rdjSvZ2C(2/3)調 AAS
>>497 問題に関係ないことを言うなよ。
524(2): 2019/03/06(水)12:34:51.62 ID:cM1JcwP7(2/3)調 AAS
>>523 誰でも解ると言うのは言い過ぎ。 何が正しいのかを示すのが例なんだし。
なんにせよお題の出し方が独断すぎるよ。
テトリスタイリングなんて知らない人にとっては説明不足だし
>>519 の説明があって初めて平面上の回転図形は同じとみなし、裏表の回転は許さないと解るけど。
それでも519のブロックは4個の組み合わせのブロックしかないが、どうして4個固定なのか? 最大辺の個数を単位とするのか?
この場合は5個固定?
***
***
***
***
***
547(11): 2019/03/08(金)00:35:43.62 ID:N66/0TP0(1/2)調 AAS
大文字小文字だけが異なる、ファイル名を見つける
入力
aB.txt
Ab.txt
xx
cd
cD
CD
出力
aB.txt : Ab.txt
cd : cD : CD
699: 2019/03/15(金)10:50:31.62 ID:ltf0XXfV(2/2)調 AAS
>>666 Lua
a=ture
a=a or print("hello world")
759(1): 2019/03/23(土)05:47:57.62 ID:ZlGSstH0(1/2)調 AAS
>>754 Squeak Smalltalk
| fn |
fn := [:str |
| map range signs sign goal position from next atEnd |
map := str lines collect: [:line | line subStrings collect: #asInteger].
range := 1@1 extent: map first size @ map size.
goal := #★. signs := #(┌ ┌ ← → └ └ ┐ ┐ ↑ ↓ ┘ ┘) readStream.
sign := Dictionary new.
0 asPoint fourNeighbors combinations: 2 atATimeDo: [:combi |
sign at: combi copy put: signs next; at: combi reversed put: signs next].
position := 1@1. from := nil. next := 2. atEnd := false.
[atEnd] whileFalse: [
| found delta |
found := position fourNeighbors detect: [:neighPos |
(range containsPoint: neighPos) and: [((map at: neighPos y) at: neighPos x) = next]
] ifNone: [atEnd := true. Float nan].
delta := found - position.
(map at: position y) at: position x put: (sign at: {from ifNil: [delta negated]. delta} ifAbsent: goal).
position := found. from := delta negated. next := next + 1].
(map collect: #join) asStringWithCr
].
fn value: '1 4 5 6
2 3 8 7
15 14 9 10
16 13 12 11' .
"=>
'↓┌→┐
└┘┌┘
┌┐└┐
★└←┘' "
799: 2019/04/01(月)03:15:46.62 ID:Mx+j7LaB(1/2)調 AAS
Windows環境だとdirectx叩くことになるのかな
VT100とかXとかは全く知らないけど DisplayWidth とか DisplayHeight とか使うのか
あるいは何らかのクラスのメンバー関数を呼ぶのか
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 1.549s*