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
Rustで競技プログラミング
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
rf-castle
July 08, 2022
57
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rustで競技プログラミング
rf-castle
July 08, 2022
More Decks by rf-castle
See All by rf-castle
Alter_Linuxのすすめ
rfcastle
0
170
Python_Parrotと学ぶPythonの並行実行.pdf
rfcastle
0
110
PythonParrotと学ぶPythonの並列実行
rfcastle
0
71
Nuxt jsに触れてみた
rfcastle
0
34
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Prompt Engineering for Job Search
mfonobong
0
360
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Raft: Consensus for Rubyists
vanstee
141
7.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
380
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
240
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
Practical Orchestrator
shlominoach
191
11k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
210
Transcript
RustでAtcoder 会津大学 田城幸太
自己紹介 • 会津大学 学部4年 • 田城幸太 • 通りすがりのPythonParrot(RustParrotに変身中) • STETCH,
Zli所属 • 嫁:羽黒(艦これ) • 妹:チノ(ごちうさ) • 相棒:キィラン(ゼノンザード) • Twitter: @kouta_tashiro
アジェンダ • 競技プログラミング・Atcoderってなぁに? • Rustってなぁに? • Why Rust? • Rustの勉強の仕方
• 便利ツール
競技プログラミング・Atcoderってなぁに? • 競技プログラミングでは、参加者全員に同一の課題が出題され、より早く与えられた要 求を満足するプログラムを正確に記述することを競う。 • (Wikipediaより引用) • 競技プログラミングコンテストサイト。 • コンテストと呼ばれ、決められた時間内にいかに多く・早く問題を解けるかを競う
• 良い成果を出すとレートが上がるレート制。 • ある程度レートが上がると色が付く。
実際に、 Atcoderの問題を 1つ解いてみましょう。
Atcoderとは? • 競技プログラミングサイト。 • 良い成果を出すとレートが上がるレート制。 • ある程度レートが上がると色が付く。 • 以下のコンテストが開かれている。 •
ABC:初心者向けコンテスト。土 or 日 の 21:00~に開かれている場合が多い。 • 制限時間100分 • ARC:中級者向けコンテスト。こちらも土 or 日 の 21:00開始が多い。 • 制限時間120分 • AGC:上級者向けコンテスト。不定期 • 制限時間180分 • かなりつよつよにならないと参加してもレート上がらない
Rustってなぁに? • プログラミング言語の一種。 • 特徴 • 静的型付け・コンパイラ言語 • コンパイラが優秀 •
型システムの推論が優秀 • 所有権システムによってGCなしのメモリ安全性 • イテレータやパターンマッチングなどの関数型言語の要素 • OptionやResultによるエラーハンドリング
Why Rust? • C/C++と同等以上の実行速度 • Pythonでやると、アルゴリズム的に正しくても、実行速度が不足して TLE(時間制限超過)になってしまいやすい • C/C++のような未定義動作がない
はじめよう。Rust • Rust books • Rustの公式チュートリアル。まずはここから! • https://doc.rust-jp.rs/book-ja/title-page.html • Rust
Examples • Rustのコード集。かゆいところに手が届く。 • https://doc.rust-jp.rs/rust-by-example-ja/ • Rustlings • 実践的な問題集、手を動かしながら覚えたいならこれ! • https://github.com/rust-lang/rustlings • Atcoder Beginner Contest • だいぶ慣れてきたら挑戦してみよう。 • 過去問も公開されているから、それを解くのもヨシ!
便利にしよう。Rustでの競技プログラミング。 • cargo-compete • プロジェクト作成、コードの自動テスト・提出をしてくれるCLI。
やってみた結果。 • 茶コーダーになりました(3/26)。 緑コーダーになりたいです。
まとめ • C++も良いが、たまにはRustで競プロしようぜ • 明日 21:00~からAtcoder Beginner Contestあるからみんな出ようね