Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NONE: add generate-input command #503

Merged
merged 1 commit into from
Aug 23, 2019
Merged

Conversation

kmyk
Copy link
Member

@kmyk kmyk commented Aug 23, 2019

ランダムケースを生成するときに使うサブコマンドを追加します。
たとえば、ランダムケースを生成するスクリプトと、愚直解と、バグってる実装とを与えると、いい感じに撃墜ケースを生成してくれます。

この機能それ自体にさほど価値はありません。多少便利にはなりますが、同等のことは or i in {000..099} ; do ./generate.py > test/random-$i.in ; done とか seq 100 | parallel './generate.py | tee test/random-{}.in | ./a.out > test/random-{}.out' などでできて、ほぼ困らないためです。
これはむしろドキュメントとして働かせることを意図しています。「ランダムケースを生成してテストをする」という発想をまだ持っていない競プロerはおそらく多いはずですが、具体的にサブコマンドとして提供することでこの発想を自然に導入できます。

(宛先は develop)

@kmyk kmyk requested a review from fukatani August 23, 2019 07:20
Copy link
Contributor

@fukatani fukatani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
そのうち例をドキュメントに入れたりしたいですね。

@fukatani fukatani merged commit 5a2c96f into develop Aug 23, 2019
@fukatani fukatani deleted the feature/generate-input branch August 23, 2019 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants