{"id":11945,"date":"2021-08-17T09:34:56","date_gmt":"2021-08-17T00:34:56","guid":{"rendered":"https:\/\/sinsei.space\/blog\/?p=11945"},"modified":"2021-08-17T09:34:56","modified_gmt":"2021-08-17T00:34:56","slug":"cdw-%e3%83%9e%e3%83%83%e3%83%97%e3%82%92%e7%94%9f%e6%88%90%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/sinsei.space\/blog\/11945","title":{"rendered":"CDW \u30de\u30c3\u30d7\u3092\u751f\u6210\u3059\u308b"},"content":{"rendered":"<p><font size=4><br \/>\n2021\u5e74 8\u6708 17\u65e5<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000\u3053\u306e\u30b2\u30fc\u30e0\u88fd\u4f5c\u3067\u306f\u30de\u30c3\u30d7\u751f\u6210\u304c\u96e3\u3057\u3044\u6240\u3060\u3068\u601d\u3046\u3002<\/p>\n<p>\u3000\u3068\u306b\u304b\u304f\u3084\u3063\u3066\u307f\u3088\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03679.jpg\" alt=\"\" width=\"328\" height=\"417\" class=\"alignnone size-full wp-image-11947\" srcset=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03679.jpg 328w, https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03679-236x300.jpg 236w\" sizes=\"auto, (max-width: 328px) 85vw, 328px\" \/><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<!--more--><br \/>\n<strong>1\u30016\u65b9\u5411\u306e\u5ea7\u6a19\u3092\u6c42\u3081\u308b\u95a2\u6570\u3092\u4f5c\u308b<\/strong><\/p>\n<p>\u3000\u307e\u305a\u73fe\u5728\u306e HEX\u304b\u3089 6\u65b9\u5411\u306e\u5ea7\u6a19\u3092\u5e30\u3059\u95a2\u6570\uff08\u547d\u4ee4\uff09\u3092\u4f5c\u308b\u3002<\/p>\n<p>\u3000<span style=\"color: #0000f0;\">hm2<\/span>\u3000\u57fa\u306eHEX\u5ea7\u6a19 , \u8abf\u3079\u308b\u65b9\u5411<\/p>\n<pre class=\"lang:hsp decode:true \" >\/\/\/\/\/\/\/ HEX \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n\r\n\tht1=0,-1,0, 1, 0, 0,0\r\n\tht2=0, 0,0, 0,-1, 0,1\r\n\r\n#deffunc hm2 int _hm2n1,int _hm2n2 ; 6\u65b9\u5411\u79fb\u52d5\u5148 \u6a2a\u5411\u304d\r\n; MAP\u5ea7\u6a19(1=\u73fe\u5728HEX\u30012=\u79fb\u52d5\u5148\u65b9\u5411)\r\n\r\n\thm2n1=_hm2n1\r\n\thm2n2=_hm2n2\r\n\r\n\thm2p=-1 ; \u8fd4\u3059\u5024\r\n\r\n\tf=(hm2n1\/hxb)\\2 ; \u5947\u6570\u5217\u304b\u5076\u6570\u5217\u304b\r\n\tn=hm2n1\\(hxb*2) ; \u4f4d\u7f6e\u7a2e\u985e\u5224\u5b9a\u7528\r\n\r\n\tswitch hm2n2\r\n\t case 1 ; \u53f3\u4e0a\u306f\u3042\u308b\u304b -------\r\n\t  if hm2n1\/hxb&gt;0 and n!hxb-1 {\r\n       if f=1 : hm2n1-=hxb+ht1(1) ; \u5947\u6570\u5217\r\n       if f=0 : hm2n1-=hxb+ht2(1) ; \u5076\u6570\u5217\r\n\t   hm2p=hm2n1 ; \u53f3\u4e0a\u306e\u30de\u30c3\u30d7\u5ea7\u6a19\r\n\t  }\r\n\t swbreak\r\n\r\n\t case 2 ; \u53f3\u306f\u3042\u308b\u304b -------\r\n\t  if n!(hxb-1) and n!(hxb-1)*2 : hm2p=hm2n1+1 ; \u53f3\u306e\u30de\u30c3\u30d7\u5ea7\u6a19\r\n\t swbreak\r\n\r\n\t case 3 ; \u53f3\u4e0b\u306f\u3042\u308b\u304b -------\r\n\t  if hm2n1&lt;hyb*hxb-hxb and n!hxb-1 {\r\n       if f=1 : hm2n1+=hxb+ht1(3) ; \u5947\u6570\u5217\r\n       if f=0 : hm2n1+=hxb+ht2(3) ; \u5076\u6570\u5217\r\n\t   hm2p=hm2n1 ; \u53f3\u4e0b\u306e\u30de\u30c3\u30d7\u5ea7\u6a19\r\n\t  }\r\n\t swbreak\r\n\r\n\t case 4 ; \u5de6\u4e0b\u306f\u3042\u308b\u304b -------\r\n\t  if hm2n1&lt;hyb*hxb-hxb and n!0 {\r\n       if f=1 : hm2n1+=hxb+ht1(4) ; \u5947\u6570\u5217\r\n       if f=0 : hm2n1+=hxb+ht2(4) ; \u5076\u6570\u5217\r\n\t   hm2p=hm2n1 ; \u5de6\u4e0b\u306e\u30de\u30c3\u30d7\u5ea7\u6a19\r\n\t  }\r\n\t swbreak\r\n\r\n\t case 5 ; \u5de6\u306f\u3042\u308b\u304b -------\r\n\t  if n!0 and n!hxb : hm2p=hm2n1-1 ; \u5de6\u306e\u30de\u30c3\u30d7\u5ea7\u6a19\r\n\t swbreak\r\n\r\n\t case 6 ; \u5de6\u4e0a\u306f\u3042\u308b\u304b -------\r\n\t  if hm2n1\/hxb&gt;0 and n!0 {\r\n       if f=1 : hm2n1-=hxb+ht1(6) ; \u5947\u6570\u5217\r\n       if f=0 : hm2n1-=hxb+ht2(6) ; \u5076\u6570\u5217\r\n\t   hm2p=hm2n1 ; \u5de6\u4e0a\u306e\u30de\u30c3\u30d7\u5ea7\u6a19\r\n\t  }\r\n\t swbreak\r\n\tswend\r\n\r\n\treturn<\/pre>\n<p>\u3000ht1\u3001ht2 = \u4e0a\u4e0b\u306b\u79fb\u52d5\u3057\u305f\u6642\u306e\u3001x\u5ea7\u6a19\u306e\u5909\u5316\u3001ht1=\u5947\u6570\u5217\u306e\u6642\u3001ht2=\u5076\u6570\u5217\u306e\u6642<\/p>\n<p>\u3000hm2n1 = \u57fa\u306e HEXNo.<br \/>\n\u3000hm2n2 = \u8abf\u3079\u308b\u65b9\u5411\uff081=\u53f3\u4e0a\u30012=\u53f3\u30013=\u53f3\u4e0b\u30014=\u5de6\u4e0b\u30015=\u5de6\u30016=\u5de6\u4e0a\uff09<\/p>\n<p>\u3000hm2p = \u8abf\u3079\u305f\u65b9\u5411\u306e HEXNo.\u3092\u8fd4\u3059\u3001-1\u306f\u7121\u3057\u30010\u306f\u30de\u30c3\u30d7\u306e\u5ea7\u6a19\u3067\u4f7f\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u306e\u3067 -1\u3092\u4f7f\u3063\u3066\u308b\u3002<\/p>\n<p>\u3000f = \u5947\u6570\u5217\u304b\u5076\u6570\u5217\u304b\uff080=\u5076\u6570\u5217\u30011=\u5947\u6570\u5217\uff09<\/p>\n<p>\u3000n = \u4f4d\u7f6e\u7a2e\u985e\u5224\u5b9a\u7528\u3001\u4e3b\u306b\u3001\u5947\u6570\u5217\u306e\u53f3\u7aef\u5de6\u7aef\u304b\uff1f\u3001\u5076\u6570\u5217\u306e\u53f3\u7aef\u5de6\u7aef\u304b\uff1f<\/p>\n<p>\u3000x\u5ea7\u6a19\uff08\u5de6\u53f3\uff09\u306f -1 +1\u305a\u3064\u3067\u826f\u3044\u3002<\/p>\n<p>\u3000\u672c\u30b2\u30fc\u30e0\u3067\u306f MAP\u5ea7\u6a19\uff08HEX\u5ea7\u6a19\uff09\u3092 1\u6b21\u5143\u3067\u6271\u3046\u305f\u3081\u3001\u4e0a\u4e0b\u306b\u305a\u308c\u308b\u6642\u306f\u6a2a\u306e\u9577\u3055\uff08hxb\uff09\u5206 + -\u3059\u308b\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>2\u3001\u4f5c\u308a\u305f\u3044\u56fd\u306e\u6570\u3060\u3051 MAP\u4e0a\u306b\u30e9\u30f3\u30c0\u30e0\u306b\u70b9\u3092\u6253\u3064<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03680.jpg\" alt=\"\" width=\"327\" height=\"419\" class=\"alignnone size-full wp-image-11955\" srcset=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03680.jpg 327w, https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03680-234x300.jpg 234w\" sizes=\"auto, (max-width: 327px) 85vw, 327px\" \/><\/p>\n<p>\u3000\u307e\u305a\u56fd\u306e\u4e2d\u5fc3\u70b9\u3092\u6c7a\u3081\u308b\u3002<\/p>\n<p>\u3000\u3053\u306e\u6642\u306b\u56fd\u540c\u58eb\u304c\u4e00\u5b9a\u306e\u8ddd\u96e2\u3092\u6301\u3064\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u3060\u307e\uff08\u56fa\u307e\u308a\uff09\u306b\u306a\u308b\u4e8b\u304c\u7121\u3044\u3002<\/p>\n<pre class=\"lang:hsp decode:true \" >#deffunc map_build\r\n\r\n\thxb=26 ; \u6a2a\u306e\u30de\u30b9\u306e\u6570\r\n\thyb=41 ; \u7e26\u306e\u30de\u30b9\u306e\u6570\r\n\r\n\tmb=hxb*hyb\r\n\t dim map,mb+1 ; \u30de\u30c3\u30d7\u30c7\u30fc\u30bf\r\n\r\n\trepeat mb : map(cnt)=-1 : loop\r\n\r\n; \u56fd\u306e\u4e2d\u5fc3\u70b9 ----------\r\n\r\n\tldb=40\t ; \u56fd\u306e\u6570\r\n\tldob=100 ; \u56fd\u571f\u306e\u6700\u5927\r\n\tdim ld,(ldb+1)*ldob+1 ; \u9818\u571f\r\n\r\n\tldn=1 ; \u56fd\u306eNo.\r\n\r\n\trepeat\r\n\t await 0\r\n\t r=rnd(mb)+1\r\n\t  if r\\(hxb*2)=hxb*2-1 : continue ; \u53f3\u306e\u7a7a\u767d\r\n\t  if map(r)&gt;0 : continue ; \u65e2\u306b\u3042\u308b\r\n\r\n\t mf=0\r\n\t repeat 6,1 ; \u5468\u8fba\u306b\u56fd\u304c\u7121\u3044\u304b\r\n\t  hm2 r,cnt\r\n\t   if hm2p=-1 : mf=1 : break\r\n\t   if map(hm2p)&gt;0 : mf=1 : break\r\n\t   hm2p2=hm2p\r\n\t  repeat 6,1 ; 2\u30de\u30b9\u76ee\r\n\t   hm2 hm2p2,cnt\r\n\t    if hm2p=-1 : mf=1 : break\r\n\t    if map(hm2p)&gt;0 : mf=1 : break\r\n\t  loop\r\n\t  if mf=1 : break\r\n\t loop\r\n\t if mf=1 : continue ; \u5468\u8fba\u306b\u56fd\u304c\u3042\u308b\r\n\r\n\t map(r)=ldn : ld(ldn*ldob)=r\r\n\r\n\t if ldn=ldb : break\r\n\t ldn+\r\n\tloop<\/pre>\n<p>\u3000r=rnd(mb)+1 \u3067\u30e9\u30f3\u30c0\u30e0\u306b\u70b9\u3092\u6c7a\u3081\u307e\u3059\u3002<\/p>\n<p>\u3000\u305d\u306e\u5468\u8fba 2\u30de\u30b9\u306b\u65e2\u306b\u70b9\u304c\u6253\u3063\u3066\u306a\u3044\u304b\u8abf\u3079\u307e\u3059\u3002<\/p>\n<p>\u3000\u5468\u8fba 2\u30de\u30b9\u306b\u70b9\u304c\u7121\u3051\u308c\u3070\u3001\u305d\u306e\u5834\u6240\u306b\u70b9\u3092\u6253\u3061\u307e\u3059\u3002<\/p>\n<p>\u3000\u3053\u308c\u3092\u56fd\u306e\u6570\uff08\u3053\u306e\u5834\u5408\u306f 40\u500b\uff09\u3060\u3051\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u3000\u5404\u56fd\u306e\u56fd\u571f\u306f ld\u3067\u6301\u3061\u307e\u3059\u3002<\/p>\n<p>\u3000\u3053\u306e\u5834\u5408\u3001\u30de\u30c3\u30d7\u306e\u5927\u304d\u3055\u306b\u5bfe\u3057\u3066\u56fd\u306e\u6570\u304c\u591a\u3044\u3068\u3001\u70b9\u304c\u6253\u3066\u306a\u304f\u3066\u7121\u9650\u30eb\u30fc\u30d7\u3057\u307e\u3059\u3001await 0\u306f\u305d\u306e\u6642\u7528\u306b\u66f8\u3044\u3066\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3000\u3082\u3057\u3001\u3053\u306e\u6bb5\u968e\u3067\u3001\u4f8b\u3048\u3070\u4e2d\u5fc3\u306e 20 \u00d7 20\u30de\u30b9\u306e\u7bc4\u56f2\u306b\u306f\u70b9\u3092\u6253\u3066\u306a\u3044\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u30de\u30c3\u30d7\u3068\u3057\u3066\u306f\u30c9\u30fc\u30ca\u30c4\u578b\u3001\u30ea\u30f3\u30b0\u72b6\u306e\u30de\u30c3\u30d7\u3092\u4f5c\u6210\u3057\u305f\u308a\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>3\u3001\u5404\u56fd\u306e\u4e2d\u5fc3\u70b9\u3092\u57fa\u306b\u56fd\u571f\u3092\u62e1\u5927\u3059\u308b<\/strong><\/p>\n<p>\u3000\u6253\u3063\u305f\u70b9\u3092\u57fa\u306b\u5468\u8fba\u306b\u62e1\u5927\u3057\u3066\u884c\u304d\u307e\u3059\u3002<\/p>\n<p>\u3000\u62e1\u5927\u3059\u308b\u304b\u3069\u3046\u304b\u306f\u78ba\u7387\u3067\u30e9\u30f3\u30c0\u30e0\u306b\u6c7a\u3081\u307e\u3059\u3002<\/p>\n<p> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03681.jpg\" alt=\"\" width=\"326\" height=\"417\" class=\"alignnone size-full wp-image-11964\" srcset=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03681.jpg 326w, https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03681-235x300.jpg 235w\" sizes=\"auto, (max-width: 326px) 85vw, 326px\" \/><\/p>\n<pre class=\"lang:hsp decode:true \" >; \u5404\u9818\u571f ----------\r\n\r\n\tldpb=100\r\n\t dim ldp,(ldb+1)*ldpb+1 ; \u62e1\u5f35\u9818\u571fNo.\u4e00\u6642\u683c\u7d0d\r\n\t dim ldpc,ldb+1\t\t\t; \u767b\u9332\u30ab\u30a6\u30f3\u30c8\r\n\t dim ldpg,ldb+1\t\t\t; \u73fe\u5728\u691c\u7d22\u4e2d\u30ab\u30a6\u30f3\u30c8\r\n\r\n\trepeat (ldb+1)*ldpb+1 : ldp(cnt)=-1 : loop ; \u30ea\u30bb\u30c3\u30c8\r\n\trepeat ldb,1 ; \u30ea\u30bb\u30c3\u30c8\r\n\t ldp(cnt*ldpb)=ld(cnt*ldob) ; \u57fa\u70b9\r\n\t ldpc(cnt)=0\t\t\t\t; \u767b\u9332\u30ab\u30a6\u30f3\u30c8\r\n\t ldpg(cnt)=0\t\t\t\t; \u73fe\u5728\u691c\u7d22\u4e2d\u30ab\u30a6\u30f3\u30c8\r\n\tloop\r\n\r\n\tldpec=1 ; \u4e00\u5ea6\u306b\u62e1\u5f35\u3059\u308b\u6570\r\n\trepeat 6 : rc=cnt ; 6\u5468\r\n\t repeat ldpec\r\n\t  repeat ldb,1 : ldn=cnt ; \u56fdNo,\r\n\t   mn=ldp(ldn*ldpb+ldpg(ldn)) ; \u691c\u7d22\u3059\u308bHEX\r\n\t    if mn=-1 : break\r\n\t     ldpg(ldn)+\r\n\t   repeat\r\n\t    repeat 6,1\r\n\t     r=rnd(100)+1 : if r&gt;60-rc*10 : continue ; \u9818\u571f\u4f38\u3070\u3059\u304b\r\n\t     hm2 mn,cnt\r\n\t      if hm2p=-1\t\t: continue ; \u9818\u571f\u3042\u308b\u304b\r\n\t      if map(hm2p)&gt;0 \t: continue ; \u65e2\u306b\u9818\u571f\u304c\u3042\u308b\r\n\r\n\t     map(hm2p)=ldn ; \u56fd\u571f\u62e1\u5f35\r\n\t     ldpc(ldn)+\r\n\t       ld(ldn*ldob+ldpc(ldn))=hm2p ; \u56fd\u571f\u767b\u9332\r\n\t      ldp(ldn*ldpb+ldpc(ldn))=hm2p ; \u691c\u7d22\u56fdNo.\u683c\u7d0d\r\n\r\n\t    loop\r\n\t    if ldpc(ldn)&gt;1 : break ; \u56fd\u571f\u304c3\u3064\u4ee5\u4e0a\u3042\u308b\r\n\t   loop\r\n\r\n\t  loop\r\n\t  ldpec+=2\r\n\t loop\r\n\tloop\r\n<\/pre>\n<p>\u3000\u307e\u305a\u6700\u521d\u306b\u56fd\u306e\u4e2d\u5fc3\u70b9\u306e\u56de\u308a 6\u30de\u30b9\u306b\u56fd\u571f\u3092\u62e1\u5f35\u3059\u308b\u304b\u3069\u3046\u304b\u4e71\u6570\u3067\u6c7a\u3081\u307e\u3059\u3002<\/p>\n<p>\u3000r=rnd(100)+1 : if r&gt;60-rc*10 : continue ; \u9818\u571f\u4f38\u3070\u3059\u304b<\/p>\n<p>\u3000\u306a\u306e\u3067 100%\u3067\u6700\u521d\u306f 60%\u306e\u78ba\u7387\u3067\u56fd\u571f\u3092\u4f38\u3070\u3059\u304b\u6c7a\u3081\u307e\u3059\u3002<\/p>\n<p>\u3000\u3053\u306e\u6642\u30011\u30de\u30b9\u3082\u56fd\u571f\u3092\u62e1\u5f35\u3057\u306a\u3044\u78ba\u7387\u3082\u3042\u308a\u3001\u305d\u306e\u5834\u5408\u306f\u305d\u306e\u56fd\u306f 1\u30de\u30b9\u3068\u3044\u3046\u4e8b\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3051\u3069\u30011\u30de\u30b960% \u00d7 6\u30de\u30b9\u306a\u306e\u3067\u307e\u305a\u7121\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u3000\u4f38\u3070\u3057\u305f\u56fd\u571f\u3092 <span style=\"color: #0000f0;\">ld<\/span>\u306b\u683c\u7d0d\u3057\u3001\u6b21\u306b\u8abf\u3079\u308b HEX\u3068\u3057\u3066 <span style=\"color: #0000f0;\">ldp<\/span>\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002<\/p>\n<p>\u30002\u9031\u76ee\u306f <span style=\"color: #0000f0;\">ldp<\/span>\u306b\u683c\u7d0d\u3057\u305f HEXNo.\u3092\u57fa\u306b\u3001\u62e1\u5f35\u3059\u308b\u304b\u3069\u3046\u304b\u6c7a\u3081\u307e\u3059\u30012\u9031\u76ee\u306f 50%\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3000\u8abf\u3079\u308b\u30de\u30b9\u306e\u6570\u306f <span style=\"color: #0000f0;\"> ldpec<\/span>\u3067\u3059\u306e\u3067\u3001\u3053\u306e\u5834\u5408 1\u9031\u76ee\u306f 1\u30de\u30b9\u30012\u9031\u76ee\u306f 3\u30de\u30b9\u30013\u9031\u76ee\u306f 5\u30de\u30b9\u3067\u3059\u306d\u3002<\/p>\n<p>\u3000\u3053\u3093\u306a\u98a8\u306b 3\u9031\u76ee\u306f 40%\u30014\u9031\u76ee\u306f 30%\u3068\u6bb5\u3005\u78ba\u7387\u304c\u4f4e\u304f\u306a\u308a\u3001\u5148\u7d30\u308a\u3067\u3082\u6709\u308b\u7a0b\u5ea6\u307e\u3068\u307e\u3063\u305f\u56fd\u571f\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u4f5c\u308b\u4e8b\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3000\u306a\u305c\u4f55\u9031\u3082\u3057\u3066\u308b\u306e\u304b\u3068\u8a00\u3046\u3068\u3001\u5404\u5468\u56de\u6bce\u306b\u5404\u56fd\u5168\u3066\u3092\u4e00\u901a\u308a\u62e1\u5927\u3057\u3066\u307e\u3059\u3002<\/p>\n<p>\u3000\u305d\u3046\u3059\u308b\u4e8b\u306b\u3088\u308a\u30011\u56fd\u3060\u3051\u304c\u6975\u7aef\u306b\u5927\u304d\u304f\u306a\u3063\u305f\u308a\u3001\u5f8c\u304b\u3089\u306e\u56fd\u304c\u5e83\u3052\u308b\u9818\u571f\u304c\u306a\u304b\u3063\u305f\u308a\u3092\u9632\u3044\u3067\u3001\u5747\u7b49\u306a\u5927\u304d\u3055\u306b\u306a\u308b\u3046\u3088\u3046\u306b\u3057\u3066\u307e\u3059\u3002<\/p>\n<p>\u30001\u3064\u306e\u56fd\u306b\u7a74\u304c\u7a7a\u3044\u3066\u3044\u305f\u308a\u3059\u308b\u306e\u3067\u3001\u5143\u306e DiceWars\u306e\u30de\u30c3\u30d7\u4f5c\u6210\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3068\u306f\u3001\u307e\u305f\u9055\u3046\u306e\u3067\u3057\u3087\u3046\u3051\u3069\u3001\u307e\u3042\u3001\u7a74\u306f\u6e56\u304b\u5c71\u306b\u3067\u3082\u3059\u308c\u3070\u3001\u304a\u3082\u3080\u304d\u304c\u3042\u308b\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u8003\u3048\u3066\u307e\u3059\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>4\u3001\u96a3\u63a5\u56fd\u5224\u5b9a<\/strong><\/p>\n<p>\u3000\u5404\u56fd\u304c\u3001\u3069\u306e\u56fd\u3068\u96a3\u63a5\u3057\u3066\u3044\u308b\u304b\u306e\u5224\u5b9a\u3092\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03682.jpg\" alt=\"\" width=\"544\" height=\"836\" class=\"alignnone size-full wp-image-11975\" srcset=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03682.jpg 544w, https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03682-195x300.jpg 195w\" sizes=\"auto, (max-width: 544px) 85vw, 544px\" \/><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000<span style=\"color: #0000f0;\">ldb<\/span> = \u56fd\u306e\u6570<\/p>\n<p>\u3000<span style=\"color: #0000f0;\">ldl<\/span> = \u5404\u56fd\u306e\u96a3\u63a5\u56fd\u3092\u767b\u9332<\/p>\n<p>\u3000<span style=\"color: #0000f0;\">ldlb<\/span> = \u767b\u9332\u6570\u306e\u4e0a\u9650<\/p>\n<pre class=\"lang:hsp decode:true \" >; \u96a3\u56fd\u5224\u5b9a\r\n\r\n\tldlb=20 ; \u96a3\u63a5\u56fd\u767b\u9332\u3001\u6700\u592720\u56fd\r\n\t dim ldl,(ldb+1)*ldlb+1 ; \u96a3\u63a5\u56fd\r\n\r\n\trepeat ldb,1 : ldn=cnt ; \u56fd\r\n\t ldlc=ldn*ldlb ; \u96a3\u63a5\u56fd\u767b\u9332No.\r\n\r\n\t repeat ldob ; \u56fd\u571f\r\n\t  mn=ld(ldn*ldob+cnt) ; \u8abf\u3079\u308b\u30de\u30c3\u30d7No,\r\n\t   if mn=0 : break ; \u7d42\u308f\u308a\r\n\r\n\t  repeat 6,1\r\n\t   hm2 mn,cnt : if hm2p=-1 : continue\r\n\t   mn2=map(hm2p)\r\n\t    if mn2&lt;0   : continue ; \u5730\u5f62\r\n\t    if mn2=ldn : continue ; \u81ea\u56fd\r\n\r\n\t    f=0\r\n\t    repeat ldlb ; \u65e2\u306b\u767b\u9332\u6e08\u307f\u304b\r\n\t     if mn2=ldl(ldn*ldlb+cnt) : f=1 : break\r\n\t    loop\r\n\t    if f=1 : continue ; \u767b\u9332\u6e08\u307f\r\n\r\n\t    ldl(ldlc)=mn2 : ldlc+ ; \u96a3\u63a5\u56fd\u767b\u9332\r\n\t  loop\r\n\r\n\t loop\r\n\tloop<\/pre>\n<p><strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000\u5404\u56fd\u306e\u9818\u571f\u306e\u30c7\u30fc\u30bf\u306f <span style=\"color: #0000f0;\">ld<\/span>\u3067\u6301\u3063\u3066\u307e\u3059\u3002<\/p>\n<p>\u3000\u305d\u308c\u3092 1\u30de\u30b9\u3065\u3064 6\u65b9\u5411\u63a2\u67fb\u3057\u3066\u3001\u305d\u306e\u56fd\u3068\u9055\u3046\u56fd\u304c\u3042\u308c\u3070 <span style=\"color: #0000f0;\">ldl<\/span>\u306b\u767b\u9332\u3057\u307e\u3059\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>5\u3001\u5168\u56fd\u306e\u63a5\u7d9a\u5224\u5b9a<\/strong><\/p>\n<p>\u3000\u5168\u90e8\u306e\u56fd\u304c\u4e00\u3064\u306b\u7e4b\u304c\u3063\u3066\u3044\u308b\u304b\u5224\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u3000\u3053\u3053\u307e\u3067\u3060\u3068\u5cf6\u56fd\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03683.jpg\" alt=\"\" width=\"325\" height=\"413\" class=\"alignnone size-full wp-image-11982\" srcset=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03683.jpg 325w, https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03683-236x300.jpg 236w\" sizes=\"auto, (max-width: 325px) 85vw, 325px\" \/><\/p>\n<p>\u3000\u3053\u308c\u3060\u3068\u653b\u3081\u3089\u308c\u306a\u3044\u56fd\u304c\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u3000\u5cf6\u306f\u5730\u5f62\u7684\u306b\u306f\u5473\u304c\u3042\u308b\u306e\u3067\u3001\u8239\u3067\u653b\u3081\u308b\u3088\u3046\u306a\u8a2d\u5b9a\u3067\u96a3\u63a5\u56fd\u3092\u8a2d\u5b9a\u3057\u3066\u3082\u307f\u3088\u3046\u304b\u3068\u8003\u3048\u307e\u3057\u305f\u3051\u3069\u3001\u307e\u305a\u3069\u306e\u56fd\u304c\u5cf6\u304b\u5224\u5b9a\u3057\u3001\u304b\u3064\u305d\u306e\u5cf6\u306e\u5927\u9678\u306b\u4e00\u756a\u8fd1\u3044\u56fd\u3068\u3001\u5927\u9678\u5074\u306e\u4e00\u756a\u8fd1\u304f\u306e\u56fd\u304c\u3069\u308c\u304b\u3092\u5224\u5b9a\u3057\u3001\u304b\u3064\u3069\u3046\u7e4b\u304c\u3063\u3066\u308b\u304b\u3092\u8868\u793a\u3059\u308b\u3068\u3044\u3046\u4e8b\u3092\u8003\u3048\u308b\u3068\u3001\u7d50\u69cb\u3084\u3084\u3053\u3057\u304f\u3066\u3081\u3093\u3069\u304f\u3055\u3044\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u5168\u90e8\u306e\u56fd\u304c\u7e4b\u304c\u3063\u3066\u308b\u4e8b\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><\/p>\n<pre class=\"lang:hsp decode:true \" >; \u5168\u56fd\u63a5\u7d9a\u5224\u5b9a\r\n\r\n\tdim ldl1,ldb+1 ; 1\u7fa4\r\n\r\n\trepeat ldb : ldl1(cnt)=0 : loop ; \u30ea\u30bb\u30c3\u30c8\r\n\r\n\tc=0 : ldl1(c)=1 ; 1\u56fd\u304b\u3089\r\n\trepeat ldb ; \u56fd\r\n\t ldn=ldl1(c) : if ldn=0 : break\r\n\r\n\t repeat ldlb ; \u306e\u96a3\u63a5\u767b\u9332\r\n\t  n=ldl(ldn*ldlb+cnt) : if n=0 : break\r\n\r\n\t  repeat ldb\r\n\t   if ldl1(cnt)=n : break ; \u767b\u9332\u6e08\u307f\r\n\t   if ldl1(cnt)=0 : ldl1(cnt)=n : break ; 1\u7fa4\u306b\u767b\u9332\r\n\t  loop\r\n\t loop\r\n\r\n\t c+\r\n\tloop\r\n\r\n\treturn<\/pre>\n<p><strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u30001\u56fd\u304b\u3089\u59cb\u3081\u307e\u3059\u3002<\/p>\n<p>\u3000\u5224\u5b9a\u306b\u306f\u5148\u307b\u3069\u4f5c\u3063\u305f\u96a3\u63a5\u56fd\u306e\u30c7\u30fc\u30bf <span style=\"color: #0000f0;\">ldl<\/span>\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u3000<span style=\"color: #0000f0;\">ldl1<\/span>\u306b 1\u56fd\u306b\u96a3\u63a5\u3059\u308b\u56fd\u3092\u767b\u9332\u3057\u3001\u305d\u308c\u3092\u5143\u306b\u9806\u756a\u306b\u63a5\u7d9a\u56fd\u3092\u767b\u9332\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000\u6700\u7d42\u7684\u306b\u30de\u30c3\u30d7\u751f\u6210\u306f\u6b21\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:hsp decode:true \" >*map_create ; \u30de\u30c3\u30d7\u751f\u6210\r\n\r\n\trepeat\r\n\t map_build\r\n\r\n\t f=0\r\n\t repeat ldb\r\n\t  if ldl1(cnt)=0 : f=1 : break\r\n\t loop\r\n\t if f=0 : break ; \u5168\u90e8\u7e4b\u304c\u3063\u3066\u308b\r\n\tloop\r\n\r\nreturn\r\n<\/pre>\n<p>\u3000ldb = \u56fd\u306e\u6570 40\u56fd\u306a\u306e\u3067\u3001\u8981\u3059\u308b\u306b\u63a5\u7d9a\u56fd\u304c 40\u56fd\u3042\u308b\u304b\u5224\u5b9a\u3057\u3066\u307e\u3059\u3002<\/p>\n<p>\u3000\u63a5\u7d9a\u56fd\u304c 40\u56fd\u306b\u6e80\u305f\u306a\u3044\u5834\u5408\u306f\u3001\u3082\u3046\u4e00\u5ea6\u30de\u30c3\u30d7\u3092\u4f5c\u308a\u76f4\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03684.jpg\" alt=\"\" width=\"328\" height=\"413\" class=\"alignnone size-full wp-image-11996\" srcset=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03684.jpg 328w, https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2021\/08\/img03684-238x300.jpg 238w\" sizes=\"auto, (max-width: 328px) 85vw, 328px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>2021\u5e74 8\u6708 17\u65e5 \u3000 \u3000 \u3000\u3053\u306e\u30b2\u30fc\u30e0\u88fd\u4f5c\u3067\u306f\u30de\u30c3\u30d7\u751f\u6210\u304c\u96e3\u3057\u3044\u6240\u3060\u3068\u601d\u3046\u3002 \u3000\u3068\u306b\u304b\u304f\u3084\u3063\u3066\u307f\u3088\u3046\u3002 \u3000 \u3000<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11945","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts\/11945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/comments?post=11945"}],"version-history":[{"count":49,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts\/11945\/revisions"}],"predecessor-version":[{"id":12143,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts\/11945\/revisions\/12143"}],"wp:attachment":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/media?parent=11945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/categories?post=11945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/tags?post=11945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}