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
Competitive programming by Rust
Search
fnwiya
September 05, 2018
Technology
2.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Competitive programming by Rust
https://rust.connpass.com/event/92821/
のLT資料
fnwiya
September 05, 2018
More Decks by fnwiya
See All by fnwiya
20221102_pmconf_b1_プロダクトマネジメントと民主主義.pdf
fnwiya
3
7.7k
Serverless Rust
fnwiya
0
3k
WebAssembly future
fnwiya
0
2.3k
Other Decks in Technology
See All in Technology
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
280
Amazon Redshift zero-ETL 統合を活用した軽量なマルチプロダクトデータ可視化基盤 / Lightweight Multi-Product Data Visualization with Amazon Redshift Zero-ETL
kaminashi
0
120
WebGIS AI Agentの紹介
_shimizu
0
600
スタートアップにおけるアジャイルの実践について #shibuyagile
murabayashi
1
210
自分が詳しくない領域でAIを使う #プロヒス2026
konifar
20
8k
toB プロダクトから見たWAF
tokai235
0
260
From Prompt Engineering to Loop Engineering
shibuiwilliam
1
290
飲食店もAIで。レジ締めやハンディシステムをつくってる話 / Using AI for restaurant management
vtryo
0
210
どうして今サーバーサイドKotlinを選択したのか
nealle
0
140
Agile and AI Redmine Japan 2026
hiranabe
4
520
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
290
スタートアップにAmazon EKSは早すぎる? マルチプロダクト戦略を加速する Platform Engineeringの実践 / Is Amazon EKS Too Soon for Startups? Practical Platform Engineering to Accelerate a Multi-Product Strategy
elmodev09
1
1.9k
Featured
See All Featured
Accessibility Awareness
sabderemane
1
150
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
490
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
240
Speed Design
sergeychernyshev
33
1.9k
WCS-LA-2024
lcolladotor
0
660
Claude Code のすすめ
schroneko
67
230k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Transcript
Rustॳ৺ऀ ·ͣڝϓϩ͔Β࢝ΊͨΒ ྑͦ͞͏ͬͯ
ࣗݾհ • Kohno Fumiya ( @fnwiya ) • Japan Venture
Research Co., LTD. • React Native & Ruby on Rails • RustΛۀʹಋೖ͍ͨ͠ʢ͢Δʣ
৽͍͠ݴޠͷशಘʹ ࣗͷ࡞Γ͍ͨͷΛ࡞ΔաఔͰ ֶͿͷ͕ϕετ
ڝϓϩͱ ڝٕϓϩάϥϛϯάʢӳޠ: Competitive programmingɺུশ: ڝϓϩʣͱɺ ϓϩάϥϛϯάίϯςετͰߦΘΕΔڝٕͷҰछͰ͋Δɻ ڝٕϓϩάϥϛϯάͰɺࢀՃऀશһʹಉҰͷ՝͕ग़͞ΕɺΑΓૣ͘༩͑ ΒΕͨཁٻΛຬ͢ΔϓϩάϥϜΛਖ਼֬ʹهड़͢Δ͜ͱΛڝ͏ɻίϯϐϡʔλ αΠΤϯεֶͷࣝΛඞཁͱ͢Δ͕ଟ͘ɺ৽ଔֶੜͷ࠾༻׆ಈͳͲʹ ΘΕΔ͜ͱ͋Δɻଟ͘ͷίϯςετͰΦϯϥΠϯδϟοδ͕࠾༻͞Ε͍ͯ
Δɻ ·ͨɺڝٕϓϩάϥϛϯάʹࢀՃ͢ΔਓΛʮڝٕϓϩάϥϚʯ·ͨʮڝϓϩ erʯͱݺͿ͜ͱ͕͋Δɻ https://ja.wikipedia.org/wiki/ڝٕϓϩάϥϛϯά
ྫʣࣗવ a , b͕༩͑ΒΕ·͢ɻ a ͱ b ͷ͕ૉͳΒYes, ૉҎ ֎ͳΒNoΛग़ྗ͍ͯͩ͘͠͞ɻ
(a, b < 1000)
Rustacean͕ڝϓϩΛ͖͢ཧ༝ • ࡞Γ͍ͨͷ͕ͳ͕ͯ͋͘Δ • ڥߏஙෆཁ • Rustಛ༗ͳ͜ͱҰ௨Γ৮ΕΒΕΔ • String vs
Vec<char>ͳͲจࣈྻͷѻ͍ • ύλʔϯϚονɺmap().collect()ɺॴ༗ݖ • ࣮ߦ ≒ C++
RustͰڝϓϩ͢Δͱ͖ͷҙ • ඪ४ೖྗ use std::io::*; use std::str::FromStr; fn read<T: FromStr>()
-> T { let stdin = stdin(); let stdin = stdin.lock(); let token: String = stdin .bytes() .map(|c| c.expect("failed to read char") as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect(); token.parse().ok().expect("failed to parse token") } https://qiita.com/tubo28/items/ e6076e9040da57368845#%E5%85%A5%E5%87%BA%E5%8A%9B
ڝϓϩͰʹ͔ͭͳ͍͜ͱ • ςετ • Ϟδϡʔϧ • νʔϜ։ൃ
Rust͕͑ΔڝϓϩαΠτ • AtCoder • HackerRank • AOJ • ☓ topsider
·ͣ AtCoder ʹొͨ͠Β࣍ʹΔ͜ͱ ʙ ͜Ε͚ͩղ͚ेಆ͑Δʂաڈਫ਼બ 10 ʙ( https://qiita.com/drken/items/fd4e5e3630d0f5859067#5- %E9%81%8E%E5%8E%BB%E5%95%8F%E7%B2%BE%E9%81%B8-10- %E5%95%8F ) ͕͓͢͢Ί
None