Problem statement

Usage

Get started

  1. Choose a Seed to generate an input in Input.
  2. Run your solution locally and paste its output into Output.
  3. Press ▶ to play the animation. Use the slider to change the display position, and Speed to adjust the playback speed.

Load and save

  • Download: save #cases inputs, starting from Seed.
  • Select directory: choose a folder of output files and switch between them. Names such as 1234.txt or abcd_1234.txt automatically select seed 1234; other names use seed 0.
  • Export: save the current image as PNG, or the animation as GIF or Video at the current Speed.

Reading the visualization

Target shows the current target barcode, and Display shows the current display. White and black represent the window colors. Red marks below Display indicate mismatches with the target, and blue marks above it indicate windows whose colors changed in the last operation. Hover over a window to see its number and the visible sheet. After all orders have been processed, the last target remains displayed.

Stack shows the order of the sheets. The arrows above each column show its range of ranks. Read down the left column, then the middle column, then the right column. Positions within each sheet are arranged by window number: white and black represent the sheet colors, and the blue-gray background represents holes. Hidden white and black parts are shown in lighter shades. An orange mark on the left indicates a sheet with a visible part, and a blue outline highlights the sheet moved in the last operation. The Paper field shows that sheet's number and its ranks before and after the move. Hover over a sheet to see its rank, number, and pattern.

Moves per order shows the number of operations for each order. Red bars indicate incorrect orders, and the blue vertical line indicates the current order. Orders with no operations also have a small mark. Hover over a bar to see the order number, target, operation count, and whether it was correct. Click a bar to jump to the start of that order. An order with no operations shares its display position with the next order, so the display immediately advances to the next order. The chart shows all processed orders in the output.

t is the number of sheet-moving operations, equal to Moves. At t=0, the designed sheets are already displayed. When an order is completed, the target immediately switches to the next order at the same display position. Errors caused by invalid output or premature termination are shown at the position of the last successful operation. Processed counts processed orders, including incorrect ones; Moves counts operations; and Mismatch counts windows that differ from the target. E counts incorrect orders. score is the absolute score so far, 2KE+T (smaller is better). At the last position, the final score or error is shown.

問題文

使い方

まず使ってみる

  1. Seed を選ぶと、Input に入力が生成されます。
  2. 解答プログラムをローカルで実行し、出力を Output に貼り付けます。
  3. ▶ で再生します。スライダーで表示位置、Speed で再生速度を変更できます。

ファイルの読み込み・保存

  • Download:Seed から連続する #cases 個の入力をまとめて保存します。
  • Select directory:出力ファイルのフォルダを選ぶと、ファイルを切り替えられます。1234.txt や abcd_1234.txt の形式なら Seed も自動で 1234 に切り替わり、それ以外の名前は Seed 0 で開きます。
  • Export:現在の画像を PNG、アニメーションを現在の Speed で GIF または Video に保存します。

表示の見方

上段の Target が現在の目標、Display が現在の表示です。白・黒は窓の色、Display の下の赤い印は目標との不一致、上の青い印は直前の操作で色が変わった窓を表します。窓にカーソルを合わせると番号と見えている紙が分かります。全注文の処理後は最後の目標を表示します。

Stack は紙の重ね順です。各列の矢印が順位範囲を示し、左列の上から下、次に中央列、右列の順に並びます。紙の横方向は窓番号順で、白・黒が紙の色、青灰色の背景が穴です。隠れている白黒は薄く表示します。左端の橙色の印は見えている部分がある紙、青枠は直前に動かした紙です。Paper の欄にはその紙番号と移動前後の順位を表示します。紙にカーソルを合わせると順位・紙番号・模様が分かります。

Moves per order は各注文の操作回数です。赤い棒は誤った注文、青い縦線は現在の注文を表します。0回の注文にも小さな印を付けています。棒にカーソルを合わせると注文番号・目標・操作回数・正誤が分かり、クリックでその注文の開始位置へ移動します。0回の注文は次の注文と同じ操作位置になるため、表示は即座に次へ進みます。グラフは出力に含まれる処理済み注文全体を表示します。

t は移動操作の回数で、Moves と同じ値です。t=0 では設計済みの紙を表示します。注文が完了すると同じ表示位置ですぐ次の目標へ切り替わります。不正な出力や途中終了のエラーは、最後に成功した操作の表示位置に示します。Processed は誤りを含む処理済み注文数、Moves は操作回数、Mismatch は不一致窓数です。E は誤りとなった注文数です。score は現在までの絶対スコア 2KE+T(小さいほど良い)で、最後に最終スコアまたはエラーを表示します。

No directory selected