長野美光 |
Cookie がうまく覚えないので、順位表の名前を
ローマ字:Nagano Yoshimitsu にしました。 |
静岡県
9月21日(木) 0:18:08
HomePage:ヨッシーの算数・数学の部屋 52775 |
ベルク・カッツェ |
真ん中なし 256通り
真ん中一列が全てあり 25通り 真ん中一列が真ん中ともう一つのみ 72通り 真ん中一列が真ん中のみ 64通り 合計417通りです。 |
9月21日(木) 0:19:41
52776 |
紫の薔薇の人 |
123
456 789 升目の位置を上記数で表す。 1を含む2*2を含む配置をA 3を含む2*2を含む配置をB 7を含む2*2を含む配置をC 9を含む2*2を含む配置をD #A=#B=#C=#D=2^5=32 #(A∧B)=#(A∧C)=#(B∧D)=#(C∧D)=8 #(A∧D)=#(B∧C)=4 #(A∧B∧C)=#(A∧B∧D)=#(A∧C∧D)=#(B∧C∧D)=2 #(A∧B∧C∧D)=1 #(A∨B∨C∨D) =32*4-(8*4+4*2)+(2*4)-1 =95 よって、 A,B,C,Dの配置を含まない配置の数は、 2^9-95=417 // |
9月21日(木) 0:24:36
52777 |
今年から高齢者 |
地道に求めました
中央にない場合:2^8=256 中央にある場合 中央とその他に0個:1 中央とその他に1個:8C1=8 中央とその他に2個:8C2=28 中央とその他に3個:8C3−1*4(隅に3つ)=52 中央とその他に4個:8C4−4*5(隅に3つとほかに1つ)=50 中央とその他に5個:全体から3つ除く4*5タイプ=20 中央とその他に6個:全体から2つ除く2*1(中央の両脇)=2 中央とその他に7個8個はない 256+1+8+28+52+50+20+2=417 |
9月21日(木) 1:04:30
52778 |
Jママ |
2×2が埋まる個数で場合分けして重複分を調整しました
A B C D E ●●□ ●●● ●●□ ●●● ●●● ●●□ ●●● ●●● ●●● ●●● □□□ □□□ □●● ●●□ ●●● Aの場合他の石=2^5=32通り(90度回転4通り) このAにはB=2^3=8(90度回転4通り)が重複 更にB=8にはC=1通り(180度2回転)と D=1通り(90度4回転)と E=1通り が重複 この他にAにはC=2^2=4(180度回転)も重複している よって、 32×4-8×4-4×2+1×2+1×4+1 =128-32-8+7=95 よって求める答えは 2^9-95=512-95=417通り 一回では正解にはなりませんでした… |
9月21日(木) 2:37:33
52779 |
「数学」小旅行 |
見落としが頻発で、。。。 |
9月21日(木) 6:44:10
52780 |
ハラギャーテイ |
400付近を捜しました
|
9月21日(木) 6:58:58
MAIL:tfuruya@aria.ocn.ne.jp 52781 |
「数学」小旅行 |
見落としが頻発した反省をしました。
でっ、全体からだめなのを引くことを考えたら、 n(A∪B∪C∪D) = n(A) + n(B) + n(C) + n(D) - n(A∩B) - n(A∩C) - n(A∩D) - n(B∩C) - n(B∩D) - n(C∩D) + n(A∩B∩C) + n(A∩B∩D) + n(A∩C∩D) + n(B∩C∩D) - n(A∩B∩C∩D) によるのが安全かと、 全体は2^9=512 2×2正方形が出来るのを、右上、左上、右下、左下にできるときをそれぞれA,B,C,Dとして、 上の式で、32*4-8-8-8-8-4-4+2+2+2+2-1=95, 512-95=417 これをやればよかったのに。。。 |
9月21日(木) 7:14:28
52782 |
「数学」小旅行 |
とりあえずのプログラムです。
p [0,1].repeated_permutation(9).count{|x|x[0]*x[1]*x[3]*x[4]==0&&x[1]*x[2]*x[4]*x[5]==0&&x[3]*x[4]*x[6]*x[7]==0&&x[4]*x[5]*x[7]*x[8]==0} |
9月21日(木) 7:59:41
52783 |
「数学」小旅行 |
とりあえず、N×Nの正方形で同じことを考えると、
N=4;c=0 for x in [0,1].repeated_permutation(N**2).to_a s=0 for k in 0..N-2 for l in 0..N-2 s+=x[k+l*N]*x[k+l*N+1]*x[k+l*N+N]*x[k+l*N+N+1] end end c+=1 if s==0 end p c |
9月21日(木) 8:50:06
52784 |
「数学」小旅行 |
N=3 417
N=4 42176 N-5 15701273 となりましたが、N=5では相当な時間がかかったので、N=6には挑戦せず。 |
9月21日(木) 9:30:45
52785 |
算数好きの小学生 |
初めてのコメント失礼します。
めっちゃ難しかったです。3回目でようやく正解しました。(4時間かかった) 〔解き方〕 碁石が0個〜9個のときについて場合分けをする (0個):1通り (1個):9個から1個選ぶ:9通り (2個):9個から2個選ぶ:36通り (3個):9個から3個選ぶ:84通り (4個):9個から4個選ぶ:126通り→ダメなやつが4通りある:126-4で122通り (5個):9個から5個選ぶ:126通り→ダメなやつが20通りある:126-20で106通り (6個):9個から6個選ぶ:84通り→ダメなやつが36通りある:84-36で48通り (7個):数えて10通り (8個):数えて1通り (9個):0通り 合計で1+9+36+84+122+106+48+10+1=417通り 2の9乗=512通りからダメなやつを引いても良さそうですね 長文失礼しました |
9月21日(木) 22:14:48
52786 |
まるケン |
私もNを一般化した場合をRubyで書いてみましたが、N=6はメモリ不足で落ちました。
N=2から5までの 15,417,42176,15701273 をOEISに突っ込んだところ、やっぱ出ました。N=0から11まで。 今回のには求め方やましてや漸化式っぽい表現は書かれていません。どうやって求めるんでしょうね。 A139810Number of n X n binary matrices containing no 2 X 2 all-1s sub-block.+30 12 1, 2, 15, 417, 42176, 15701273, 21418970801, 107224417436160, 1968910887183791359, 132633131268024896655873, 32775983842712963307230834176, 29712661745725058784174163778464369 |
9月22日(金) 11:07:14
MAIL:take4310@mobile.email.ne.jp 52787 |
Nの悲劇家庭教師編 |
漸化式で、縦3マス(黒丸の置き方は2×2×2=8通り)を横に1列、2列、3列と並べる。
1列の時は上と同じ8通り、2列の時は8×5+6×2+5=57通り、3列の時は57×5+46×2+40=417通り。と求めました。 |
9月22日(金) 19:42:40
52788 |
いちごみるく |
包除原理で
2^9-4*2^5+(2^3*4+2^2*2)-4*2^1+1=417 |
9月23日(土) 16:14:01
52789 |
ゴンとも |
(a)(b)(c)
(d)(e)(f) (g)(h)(i) と変数を振り 碁石のなしあるで0,1で 十進Basic で for a=0 to 1 for b=0 to 1 for c=0 to 1 for d=0 to 1 for e=0 to 1 if a=1 and b=1 and d=1 and e=1 then goto 50 for f=0 to 1 if b=1 and c=1 and e=1 and f=1 then goto 40 for g=0 to 1 for h=0 to 1 if d=1 and e=1 and g=1 and h=1 then goto 20 for i=0 to 1 if e=1 and f=1 and h=1 and i=1 then goto 10 let s=s+1 10 next i 20 next h 30 next g 40 next f 50 next e 60 next d 70 next c 80 next b 90 next a print s end f9押して 417・・・・・・(答え) |
豊川市
9月23日(土) 18:18:18
MAIL:fttnm528@ybb.ne.jp 52790 |
みかん |
ダメな例を考えて、2・3・4重に計上されるのを引いていって…で
けっきょく数が合わず認証頼みでした。 重複を考えなくてよい(#52788)はうまいやり方だと思います。 図形の敷き詰めは何通り?の問題で、漸化式っぽく解くのはしばしば 使われるやり方ですし。 |
9月23日(土) 18:38:14
52791 |
ゴンとも |
この問題の3*3の正方形を6*6にすると
(a01)(a02)(a03)(a04)(a05)(a06) (a07)(a08)(a09)(a10)(a11)(a12) (a13)(a14)(a15)(a16)(a17)(a18) (a19)(a20)(a21)(a22)(a23)(a24) (a25)(a26)(a27)(a28)(a29)(a30) (a31)(a32)(a33)(a34)(a35)(a36)と変数を振り 碁石のなしあるで0,1で 十進Basic で print time$ for a1=0 to 1 for a2=0 to 1 for a3=0 to 1 for a4=0 to 1 for a5=0 to 1 for a6=0 to 1 for a7=0 to 1 for a8=0 to 1 if a1=1 and a2=1 and a7=1 and a8=1 then goto 290 for a9=0 to 1 if a2=1 and a3=1 and a8=1 and a9=1 then goto 280 for a10=0 to 1 if a3=1 and a4=1 and a9=1 and a10=1 then goto 270 for a11=0 to 1 if a4=1 and a5=1 and a10=1 and a11=1 then goto 260 for a12=0 to 1 if a5=1 and a6=1 and a11=1 and a12=1 then goto 250 for a13=0 to 1 for a14=0 to 1 if a7=1 and a8=1 and a13=1 and a14=1 then goto 230 for a15=0 to 1 if a8=1 and a9=1 and a14=1 and a15=1 then goto 220 for a16=0 to 1 if a9=1 and a10=1 and a15=1 and a16=1 then goto 210 for a17=0 to 1 if a10=1 and a11=1 and a16=1 and a17=1 then goto 200 for a18=0 to 1 if a11=1 and a12=1 and a17=1 and a18=1 then goto 190 for a19=0 to 1 for a20=0 to 1 if a13=1 and a14=1 and a19=1 and a20=1 then goto 170 for a21=0 to 1 if a14=1 and a15=1 and a20=1 and a21=1 then goto 160 for a22=0 to 1 if a15=1 and a16=1 and a21=1 and a22=1 then goto 150 for a23=0 to 1 if a16=1 and a17=1 and a22=1 and a23=1 then goto 140 for a24=0 to 1 if a17=1 and a18=1 and a23=1 and a24=1 then goto 130 for a25=0 to 1 for a26=0 to 1 if a19=1 and a20=1 and a25=1 and a26=1 then goto 110 for a27=0 to 1 if a20=1 and a21=1 and a26=1 and a27=1 then goto 100 for a28=0 to 1 if a21=1 and a22=1 and a27=1 and a28=1 then goto 90 for a29=0 to 1 if a22=1 and a23=1 and a28=1 and a29=1 then goto 80 for a30=0 to 1 if a23=1 and a24=1 and a29=1 and a30=1 then goto 70 for a31=0 to 1 for a32=0 to 1 if a25=1 and a26=1 and a31=1 and a32=1 then goto 50 for a33=0 to 1 if a26=1 and a27=1 and a32=1 and a33=1 then goto 40 for a34=0 to 1 if a27=1 and a28=1 and a33=1 and a34=1 then goto 30 for a35=0 to 1 if a28=1 and a29=1 and a34=1 and a35=1 then goto 20 for a36=0 to 1 if a29=1 and a30=1 and a35=1 and a36=1 then goto 10 let s=s+1 10 next a36 20 next a35 30 next a34 40 next a33 50 next a32 60 next a31 70 next a30 80 next a29 90 next a28 100 next a27 110 next a26 120 next a25 130 next a24 140 next a23 150 next a22 160 next a21 170 next a20 180 next a19 190 next a18 200 next a17 210 next a16 220 next a15 230 next a14 240 next a13 250 next a12 260 next a11 270 next a10 280 next a9 290 next a8 300 next a7 310 next a6 320 next a5 330 next a4 340 next a3 350 next a2 360 next a1 print s print time$ end f9押して 18:52:53 21418970801 00:48:18 6時間程度で答えが・・・ さらに7*7,8*8,・・・はさらに時間がかかり とりあえずやめときます。 |
豊川市
9月24日(日) 9:45:31
MAIL:fttnm528@ybb.ne.jp 52792 |
スモークマン |
真ん中が塗られてない場合...2^8
真ん中が塗られている場合...2^8 左上の2x2が塗られている場合...残りのマスの塗り方=2^5 全部塗られている場合...1 右下角の逆L字3マスが塗られている場合...1 これら以外は4回転すれば違うパターンになる。 so...(2^5-2)*4+1+1*2を2^8から引く。 so...2^8+{2^8-((2^5-2)*4+3)}=2^8+2^7+5=389 ではダメな理由がわからないわたし...^^; (少なくともこれ以上なのかと認証で入ってみました...) |
9月24日(日) 10:41:14
52793 |
いちごみるく |
特に最適化をしていない愚直な行列累乗
https://wandbox.org/permlink/tz0GwmaTWuiNn7jK n=4duration = 0.001sec. n=5 duration = 0.002sec. n=6 duration = 0.005sec. n=7 duration = 0.029sec. n=8 duration = 0.175sec. n=9 duration = 1.677sec. n=10 duration = 22.581sec. 実際はn=9でlong longに収まらなくなり __int128を使う羽目になるのでもう少し遅くなるのですが。 |
9月24日(日) 18:36:26
52794 |
ドリトル |
#52793 スモークマン様
「90度ごとに回せば全て違うパターンになる」がダメかと。 例えば「左上の2×2が塗られている状態」の中の「左3×2が塗られた状態」を90度回転させると「上2×3が塗られた状態」になりますが、この回転後の状態は「左上の2×2が塗られている状態」に含まれている、つまりすでに数えているのです。 よってダブりが生じています(わかりにくくてすみません・・・)。 |
9月27日(水) 20:31:59
52795 |