Skip to content

README にバンドル前後の具体例を載せる#107

Merged
TwoSquirrels merged 3 commits into
mainfrom
docs/readme-example
Jul 15, 2026
Merged

README にバンドル前後の具体例を載せる#107
TwoSquirrels merged 3 commits into
mainfrom
docs/readme-example

Conversation

@TwoSquirrels

@TwoSquirrels TwoSquirrels commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Closes #99

概要

README (日英) の NOTE とインストールの間に「バンドル例」の節を追加する。例を見て使いたくなってからインストールへ進む、という順番を意図して、インストールより前に置いた。

  • 題材: modint.hpp を土台に modpow.hppcombination.hpp を重ねた 3 ファイルのライブラリ。解答は 2 ファイルを include するが modpow しか使わない。
  • 見せる挙動: 使っていない combination.hpp の削除・依存する modint.hpp の維持・標準ライブラリの #include 温存・#line の意味。
  • ModInt はテンプレートにしてある。テンプレートを含むライブラリでも問題なくバンドルできることを、例自体で示すため。
  • 掲載する submission.cpp はドキュメント方針 (出力の実物を転載しない) の例外として実物を貼る。ツールの顔であることと、クレジット行のバージョンで古さに気づけることが理由。

検証 (README には載せない、この PR の作業記録)

日英それぞれのコメント言語でライブラリを実際に登録・バンドルして掲載の実物を取得し、その出力が g++ でコンパイルでき、実行結果 (2^100 mod 998244353 = 882499718) が正しいことまで確認した。実行結果自体は README の例の焦点 (バンドル前後のコード変換) ではないため、README には掲載しない。

🤖 Generated with Claude Code

TwoSquirrels and others added 2 commits July 16, 2026 03:00
modint を土台に modpow と combination を重ねた 3 ファイルのライブラリ
から、使った modpow (とその依存 modint) だけが残り、使っていない
combination が消える例。出力はドキュメント方針の例外として実物を
貼る (ツールの顔であり、クレジットのバージョンで古さに気づけるため)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
英語版も日本語版と同じ構成。出力の実物は英語コメントのライブラリで
取り直したもの (コンパイル・実行まで確認済み)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Bundling example documentation

Layer / File(s) Summary
Document bundling example
README.md, README.ja.md
3つのヘッダーを使った登録例と、combination.hpp の除去、modint.hpp の保持、#line による元行番号表示を追加。

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • TwoSquirrels/risundle#51: README.mdREADME.ja.md にバンドル動作の説明を追加している点が関連。

Poem

ぴょんと跳ねて、例が咲く
使わぬヘッダーは月へ消え
必要な依存は手をつなぐ
#line が道しるべ
うさぎも安心、ひとまとめ!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed #99の「READMEに具体例を追加し、バンドル後の見え方を示す」要件を満たしています。
Out of Scope Changes check ✅ Passed READMEの例示追加に集中しており、明らかな範囲外の変更は見当たりません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed README にバンドル前後の具体例を追加する内容と一致しており、変更の主旨を適切に表しています。
Description check ✅ Passed README(日英)へのバンドル例追加や検証内容が記載されており、変更内容と整合しています。
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

テンプレートを含むライブラリでも問題なくバンドルできることを例自体
で見せる。日英それぞれの実物出力を取り直し、コンパイル・実行まで
確認済み。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@TwoSquirrels

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TwoSquirrels

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 76-113: README.md のバンドル例に、生成された submission.cpp
のコンパイルコマンドと実行コマンド、および標準出力 882499718 を追加してください。README.ja.md
の対応するバンドル例にも、同じ手順と結果を日本語で追加してください。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9d02531d-f77d-48de-a1ef-3a1c8f267554

📥 Commits

Reviewing files that changed from the base of the PR and between e67ba62 and 3fb719e.

📒 Files selected for processing (2)
  • README.ja.md
  • README.md

Comment thread README.md
@TwoSquirrels
TwoSquirrels merged commit b0fac65 into main Jul 15, 2026
10 checks passed
@TwoSquirrels
TwoSquirrels deleted the docs/readme-example branch July 15, 2026 19:48
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.

README にバンドル前後の具体例を載せる

1 participant