はじめに 2015 年末に bash で始める競技プログラミング(?)という記事をネタ半分で書いたのですが、どういうわけか百花繚乱!なないろ言語で競技プログラミングをする資料まとめ(@drken)の中で入門資料に認定されてしまったので、ひとつ釣られたつもりになって AtCoder に登録したら次にやること ~ これだけ解けば十分闘える!過去問精選 10 問 ~にある問題をすべて bash で解きました。実際に解いてみると bash の良い点も悪い点もよくわかるセットだったので、私の解答をひととおり解説しようかと思います。 なお、この記事では、読者と対して以下のことを想定します。 とりあげる問題についてはすべて解法を知っている シェルスクリプトをある程度書くことができる よく使われるコマンド(grep とか sed とか)もわかっている bash の文法については適宜説明を入れますが、必要に