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
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
260
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
560
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
290
Digitization部 紹介資料
sansan33
PRO
2
7.7k
AIコーディングの次。コードレビューと理解負荷を解消して組織の開発生産性を高める
moongift
PRO
2
2.5k
20260807_第6回_関東kaggler会LT_claw系bot xangiと始める、"寂しくない" kaggle
sugupoko
0
270
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
3
18k
Head First モブプログラミング / Head First Mobprogramming
takaking22
10
12k
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
240
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
380
TypeScript入門 2026
recruitengineers
PRO
3
580
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
750
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
410
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
890
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
370
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
990
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
430
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
460
Code Review Best Practice
trishagee
74
20k
Speed Design
sergeychernyshev
33
2k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
220
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