AtCoder Heuristic First-step Vol.2 Training

Can Participate: All Rated Range: - Penalty: 5 minutes

AtCoder Heuristic First-step Vol.2 Training は、AtCoder Heuristic First-step Vol.2 参加者向けに用意した過去に出題された問題※を使用したコンテストです。 ※2020年6月28日に開催された「Introduction to Heuristics Contest」

AtCoder Heuristic First-step Vol.2の詳細はこちら


講義資料

講演動画

  • (後日YouTubeにて公開予定)

実習用のコードはこちらからダウンロードしてください。

Web版ビジュアライザをご活用ください。

AtCoderHeuristic_FirstStep_Vol.2 サンプルコード

構成

.
├── answers 解答例なので見ないでください。
│   ├── cpp
│   └── python
└── samples 今回の演習で使うサンプル
    ├── cpp
    │   ├── sample_greedy.cpp 貪欲法の穴埋め演習用ファイル
    │   └── sample_beam.cpp ビームサーチの穴埋め演習用ファイル
    └── python
        ├── sample_greedy.py 貪欲法の穴埋め演習用ファイル
        └── sample_beam.py ビームサーチの穴埋め演習用ファイル

使い方

公式ツール をダウンロードし、以下のように配置してください。

.
├── tools
├── answers
└── samples

samples/cpp または samples/python から好きな言語を選び、
sample_greedy.cpp または sample_greedy.pyTODO と記載された部分を実装してください。


C++ の場合

# コンパイル
g++ -std=c++20 -O2 samples/cpp/sample_greedy.cpp -o a.out

# 実行
mkdir -p tools/out
./a.out < tools/in/0000.txt > tools/out/greedy.txt

# 評価
cd tools
cargo run -r --bin vis ./in/0000.txt ./out/greedy.txt

Python の場合

# 実行
mkdir -p tools/out
python3 samples/python/sample_greedy.py < tools/in/0000.txt > tools/out/greedy.txt

# 評価
cd tools
cargo run -r --bin vis ./in/0000.txt ./out/greedy.txt