
目录魔豆88881魔方三要素2复原方法魔豆7788复原方法魔豆8888数字版1问题模型2复原方法 待更新魔豆88881魔方三要素1组成部件4种颜色的豆子每种8个2可执行操作4个小圈可以旋转1个大圈也可以旋转3目标态每个小圈都是同色2复原方法只需要3步大圈旋转1格小圈旋转180度大圈反方向旋转1格即可实现相邻2个小圈之间只有1个魔豆互换。这样任意状态都可以复原了。魔豆7788不确定是店里的豆子被人扣走了还是出厂设置就是这样。一共只有30个魔豆即7788复原方法复原方法同魔豆8888魔豆8888数字版1问题模型有一个长为8N8a的序列记为a1 N1 a2 N2 a3 N3 a4 N4 a5 N5 a6 N6 a7 N7 a8 N8操作集有5种操作1a1N1a2N2构成的子序列循环往右移动1位其中表示逆序列下同2a3N3a4N4构成的子序列循环往右移动1位3a5N5a6N6构成的子序列循环往右移动1位4a7N7a8N8构成的子序列循环往右移动1位5a1a2a3a4a5a6a7a8构成的子序列循环往右移动a位2网页版程序!DOCTYPE html html langzh-CN head meta charsetutf-8 meta nameviewport contentwidthdevice-width, initial-scale1 title四矩形轮换谜题/title style *{box-sizing:border-box;} body{ margin:0; min-height:100vh; padding:22px 14px 50px; font-family:PingFang SC,Microsoft YaHei,system-ui,-apple-system,sans-serif; background:radial-gradient(circle at 20% 0%, #1e293b 0%, #0b1120 65%); color:#e2e8f0; } h1{ text-align:center; font-size:20px; font-weight:600; letter-spacing:3px; margin:6px 0 6px; color:#f1f5f9; } .sub{ text-align:center; font-size:13px; color:#8fa1b8; margin-bottom:20px; line-height:1.7; } .sub code{ background:rgba(255,255,255,.08); padding:1px 6px; border-radius:5px; color:#a5b4fc; font-size:12px; } .panel{ max-width:1180px; margin:0 auto 14px; display:flex; flex-wrap:wrap; gap:10px; justify-content:center; align-items:center; } label.field{ display:flex; align-items:center; gap:6px; font-size:13px; color:#94a3b8; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.09); padding:6px 12px; border-radius:10px; } label.field input{ width:52px; background:transparent; border:none; outline:none; color:#e2e8f0; font-size:14px; font-weight:600; text-align:center; font-family:ui-monospace,monospace; } button{ font-family:inherit; font-size:13px; font-weight:600; color:#e2e8f0; cursor:pointer; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.13); padding:8px 16px; border-radius:10px; transition:.15s; } button:hover{ background:rgba(255,255,255,.14); transform:translateY(-1px); } button:active{ transform:translateY(0) scale(.97); } button.primary{ background:linear-gradient(135deg,#4f46e5,#7c3aed); border-color:transparent; box-shadow:0 4px 14px rgba(99,102,241,.35); } button.primary:hover{ box-shadow:0 6px 20px rgba(99,102,241,.5); } button.op{ min-width:96px; background:rgba(56,189,248,.10); border-color:rgba(56,189,248,.28); color:#bae6fd; } button.op:hover{ background:rgba(56,189,248,.22); } button.op5{ background:rgba(251,191,36,.10); border-color:rgba(251,191,36,.3); color:#fde68a; } button.op5:hover{ background:rgba(251,191,36,.22); } .board-wrap{ max-width:1180px; margin:0 auto 20px; padding:10px; background:rgba(255,255,255,.025); border:1px solid rgba(255,255,255,.06); border-radius:18px; } .board-wrap svg{ width:100%; height:auto; display:block; } .board-wrap svg rect{ transition: fill .28s ease; } .board-wrap svg g.cell{ cursor:pointer; } .board-wrap svg g.cell:hover rect{ stroke:#fff; stroke-width:2; } .board-wrap svg g.cell rect{ transition: fill .28s ease, stroke .15s; } .status{ text-align:center; font-size:14px; letter-spacing:1px; color:#94a3b8; min-height:22px; font-weight:600; } .status.win{ color:#4ade80; text-shadow:0 0 18px rgba(74,222,128,.5); animation:pop .45s ease; } keyframes pop{ 0%{transform:scale(.9);} 55%{transform:scale(1.08);} 100%{transform:scale(1);} } /style /head body h1四矩形 · 轮换谜题/h1 div classsub 每个矩形上下边长 codeN/code左右边长 codea/code四个矩形共 8 条平行竖线。br 点击任一矩形 → 该矩形外围一周循环右移 1 位点击「竖线轮换」→ 8 条竖线整体循环右移 a 位。br 数字按大小分为 b stylecolor:#60a5fa4/b 种颜色目标让每个数字回到它原来的位置。 /div div classpanel label classfieldN input idinN typenumber min1 max8 value3/label label classfielda input idinA typenumber min1 max6 value2/label button idbtnShuffle classprimary打乱/button button idbtnReset复原/button /div div classboard-wrap idboard/div div classpanel button classop style="background-color:transparent">3N1,a1可以先复原颜色再想办法调整圈内顺序。公式轮换*22转轮换*62转轮换*22转轮换*62转*44复原方法 待更新