Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How to automate competition programming
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Dassimen
November 24, 2019
Programming
280
1
Share
How to automate competition programming
こちらのLT資料です。
https://gigacode.connpass.com/event/153119/
Dassimen
November 24, 2019
More Decks by Dassimen
See All by Dassimen
Write code with "Test First"
anchorcable
0
64
Trying AWS Aurora Serverless.
anchorcable
0
230
Dialogue for Design
anchorcable
1
330
How to manage a good work environment
anchorcable
0
120
TDD is not slowly.
anchorcable
1
620
3日坊主でも勉強したい
anchorcable
5
5.9k
Design It! is good for architect.
anchorcable
0
150
今だからこそ分かる報連相 / How to do Hou/Ren/Sou!
anchorcable
0
780
TDD supports us all the time.
anchorcable
0
370
Other Decks in Programming
See All in Programming
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
210
Agent Skills を社内で育てる仕組み作り
jackchuka
1
2k
Are We Really Coding 10× Faster with AI?
kohzas
0
180
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
370
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
160
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
3
950
[RubyKaigi 2026] Require Hooks
palkan
1
320
Cloudflare で始める Data Platform
ta93abe
0
170
PHPer、Cloudflare に引っ越す
suguruooki
2
220
Structured Concurrency, Scoped Values and Joiners in the JDK 25 26 27
josepaumard
1
150
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
840
Featured
See All Featured
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
170
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
180
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
How to make the Groovebox
asonas
2
2.2k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
200
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
150
RailsConf 2023
tenderlove
30
1.4k
Embracing the Ebb and Flow
colly
88
5k
Designing Experiences People Love
moore
143
24k
Transcript
Performanceを上げたいので 自動化してみました Nov 24, 2019 | #dasshimen #GigaCode2019 提出、テスト、そんなものは自動化だ! 脱脂綿
( @anchor_cable )
#GigaCode2019 2 About Me 脱脂綿 ( @anchor_cable ) 東京都内に住む脱脂綿(=Twitter名)系エンジニア •
株式会社ゆめみ ◦ サーバーサイドエンジニア ◦ 7月1日入社 • AtCoder登録は1年前
3 アジェンダ テストと提出を自動化する方法 自動化した結果どうなるのか Performanceを上げるには? 1 2 3 #GigaCode2019
Performanceを上げるには? 1
5 Performanceを上げるには? なるべく多くの問題を早く解かねばならない(今更感) AtCoder Beginner Contestの場合、 A問題とB問題を合わせて5分以内に解くのが目安 A B C
D E F #GigaCode2019
6 そうはいっても大変 そもそもやることが多い 1.問題文を読んで理解する 2.ローカルにファイルを用意する 3.コードを書く 4.実行する 5.サンプル入力を入力する 6.実行結果がサンプル結果と一致するか確かめる 7.ブラウザから提出する
#GigaCode2019
7 簡略化できる 自動化を導入すれば 1.問題文を読んで理解する 2.ローカルにファイルを用意する → 自動で作業ファイルを作成 3.コードを書く 4.実行する 5.サンプル入力を入力する
→ 自動テスト 6.実行結果がサンプル結果と一致するか確かめる 7.ブラウザから提出する → CLIからコマンドで提出できる #GigaCode2019
テストと提出を自動化する方法 2
9 自動化する方法 ツールを3つ入れてみた • online-judge-tools • atcoder-cli • Dash #GigaCode2019
10 online-judge-tools サンプル自動取得+自動テスト+自動提出 ほとんどの競プロerが使った事あるであろうツール。人権。 AtCoderの各問題に記載されている入力例、出力例を取得し、 コマンド1回で自動テストしてくれる。 もう手動で実行して、手動で入力を入れる必要はなくなった! #GigaCode2019
11 atcoder-cli online-judge-toolsのラッパーツール(AtCoder特化) online-judge-toolsは他の競プロコンテストにも対応している都合上、コマンドが長い atcoder-cliを使う事で、コマンドがかなり短縮される テンプレートファイルを自動配置する機能もある 短いコマンドで全て自動化! 問題に取り掛かる時 acc new ABC144
問題をテストする時 oj test -c "python3 main.py" 問題を提出する時 acc s #GigaCode2019
12 Dash スニペットツール(入力支援ツール) oj test -c "python3 main.py" コマンドがまだ長いので、 ;oj#
で出るようにした ついでに競プロのよく使う構文も登録してみた よく使う構文を登録していく事で、 そこで考えるコストがゼロになった #GigaCode2019
自動化した結果どうなるのか 3
14 出た成果 ABC145 Performance:822 ABC144 Performance:601 #GigaCode2019 ABC142時点でPerformance:157
15 単純な時短以外にも恩恵 気持ちの余裕が生まれる (テストで)1発で正解しないコードでも落ち着いて見返せるようになった 若干不安な部分でも、とりあえず実装してみてテスト通す 問題を解く事に全てのリソースを集中できる #GigaCode2019
16 初心者こそ無駄な所を自動化しよう #GigaCode2019 導入前 「自分にはツールはまだ早いでしょ」 「環境整備しても実力が...」 「アルゴリズムの勉強のが先かな」
17 初心者こそ無駄な所を自動化しよう #GigaCode2019 導入前 「自分にはツールはまだ早いでしょ」 「環境整備しても実力が...」 「アルゴリズムの勉強のが先かな」 導入後 「もっと早くやってればよかった」 「過去問解くのも楽しい!」
→要は良いIDEや良いPC揃えるのと同じ
18 まとめ リラックスして本当の実力を引き出そう 初心者こそ自動化の恩恵を受けよう ツールを入れて手動作業を自動化しよう 1 2 3 #GigaCode2019
ご清聴ありがとうございました
20 参考リンク Atcoder環境をatcoder-cli + online-judge-tools + Dashで構築する https://qiita.com/anchor-cable/items/98a0bf669513d47972d4 AtCoder に登録したら次にやること
~ これだけ解けば十分闘える!過去問精選 10 問 ~ https://qiita.com/drken/items/fd4e5e3630d0f5859067 #GigaCode2019