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
Rubyで競技プログラミング(入門編)
Search
yhara
September 10, 2016
Programming
0
1.8k
Rubyで競技プログラミング(入門編)
yhara
September 10, 2016
Tweet
Share
More Decks by yhara
See All by yhara
静的型付けプログラミング言語Shiika
yhara
0
18k
それは残像だ
yhara
4
4.2k
スモートーク
yhara
0
2.8k
Ovto: Frontend web framework for Rubyists
yhara
0
7.1k
Ruby, Opal and WebAssembly
yhara
2
2.4k
Competitive Programming in Ruby (101)
yhara
0
680
良いデバッグログはプロジェクトの資産である
yhara
54
18k
Let's make a functional language!
yhara
0
6.3k
Recent Updates (近況報告)
yhara
0
590
Other Decks in Programming
See All in Programming
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
200
React への依存を最小にするフロントエンド設計
takonda
6
1.4k
Quine, Polyglot, 良いコード
qnighy
4
650
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
340
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
200
Macとオーディオ再生 2024/11/02
yusukeito
0
380
C++でシェーダを書く
fadis
6
4.1k
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
距離関数を極める! / SESSIONS 2024
gam0022
0
290
Featured
See All Featured
Code Review Best Practice
trishagee
64
17k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
GraphQLとの向き合い方2022年版
quramy
43
13k
Docker and Python
trallard
40
3.1k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Done Done
chrislema
181
16k
Rails Girls Zürich Keynote
gr2m
94
13k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Navigating Team Friction
lara
183
14k
Transcript
RubyͰڝٕϓϩάϥϛϯά(ೖฤ) RubyKaigi 2016 Kyoto LT (2016-09-10) yhara (Yutaka Hara) RubyKaigi
2016 Kyoto LT (2016-09-10) 1
NaCl দߐຊࣾ AtCoderձ • ਫ༵18:00-20:00 • 4,5ਓͰͬͯΔ • ݴޠࣗ༝ (͍·ͷͱ͜ΖΈΜͳRuby)
RubyKaigi 2016 Kyoto LT (2016-09-10) 2
ڝٕϓϩάϥϛϯάͬͯʁ RubyKaigi 2016 Kyoto LT (2016-09-10) 3
ϓϩάϥϛϯάίϯςετ RubyKaigi 2016 Kyoto LT (2016-09-10) 4
݅Λຬͨ͢ϓϩάϥϜΛɺ͘ɾ ਖ਼֬ʹهड़͢Δڝٕ RubyKaigi 2016 Kyoto LT (2016-09-10) 5
C(++, #)ͱJava͚ͩ͡Όͳ͍ͷʁ RubyKaigi 2016 Kyoto LT (2016-09-10) 6
RubyͰࢀՃͰ͖Δ RubyKaigi 2016 Kyoto LT (2016-09-10) 7
• Sphere Online Judge • Aizu Online Judge • yukicoder
• AtCoder ←ࠓ͜ΕΛհ RubyKaigi 2016 Kyoto LT (2016-09-10) 8
Ruby 2.3.0͕ೖͬͯΔ RubyKaigi 2016 Kyoto LT (2016-09-10) 9
Կ͔ΒΕ͍͍ͷʁ RubyKaigi 2016 Kyoto LT (2016-09-10) 10
• AtCoder Grand Contest • AtCoder Regular Contest • AtCoder
Beginner Contest • AtCoder Typical Contest RubyKaigi 2016 Kyoto LT (2016-09-10) 11
Βͳ͍ RubyKaigi 2016 Kyoto LT (2016-09-10) 12
աڈΛΔ RubyKaigi 2016 Kyoto LT (2016-09-10) 13
• ͖ͳͱ͖ʹͰ͖Δ • যΒͳͯ͘ࡁΉ RubyKaigi 2016 Kyoto LT (2016-09-10) 14
• AtCoder Grand Contest • AtCoder Regular Contest • AtCoder
Beginner Contest • AtCoder Typical Contest RubyKaigi 2016 Kyoto LT (2016-09-10) 15
AtCoder Beginner Contest • A: ָউ • B: ؆୯ •
C: ॳڃ • D: தڃ(Γͨ͑͋͝Δ) ※ճʹΑͬͯқʹඍົͳ͕ࠩ͋Γ·͢(͍͖ͳΓ͍͠ճҾ͍ ͯམͪࠐ·ͳ͍Α͏ʹ) RubyKaigi 2016 Kyoto LT (2016-09-10) 16
Rubyͩͱ λΠϜΞτ ͦ͠͏…ʁ RubyKaigi 2016 Kyoto LT (2016-09-10) 17
ͦΕͳΓઓ͑Δ RubyKaigi 2016 Kyoto LT (2016-09-10) 18
ΞϧΰϦζϜେࣄ RubyKaigi 2016 Kyoto LT (2016-09-10) 19
ྫɿҰྻΦηϩ (C) RubyKaigi 2016 Kyoto LT (2016-09-10) 20
ҰྻΦηϩ • NݸͷۨͱɺQݸͷϨϯδ͕༩͑ΒΕΔ • ֤ൣғΛͻͬ͘Γฦͨ͠ͱ͖ͷ࠷ऴঢ়ଶΛٻΊΑ ••••••••• 1..4 2..6 8..9 ɹɹ↓
◦•••◦◦•◦◦ RubyKaigi 2016 Kyoto LT (2016-09-10) 21
֤ൣғʹ͍ͭͯۨΛసͤ͞Ε͍͍͚ͩ͡ ΌͶʁ ranges.each do |r| r.each do |i| line[i] =
!line[i] end end RubyKaigi 2016 Kyoto LT (2016-09-10) 22
ͱ͜Ζ͕ RubyKaigi 2016 Kyoto LT (2016-09-10) 23
• Φηϩ͕(࠷େ)20ສݸ͋Δ • ൣғ(࠷େ)20ສݸ͋Δ RubyKaigi 2016 Kyoto LT (2016-09-10) 24
ेԯճɺస͠ͳ͍ͱ͍͚ͳ͍ ranges.each do |r| # <- 20ສճ r.each do |i|
# <- ͦΕͧΕສճ͘Β͍ line[i] = !line[i] end end RubyKaigi 2016 Kyoto LT (2016-09-10) 25
⏰ ੍ݶ࣌ؒ2ඵ RubyKaigi 2016 Kyoto LT (2016-09-10) 26
͏·͍Γ͔ͨ ৭͕มΘΔͱ͜Ζ͚ͩΛ͓֮͑ͯ͘ 2 10001 23005 ↓ɹɹɹɹ↓ɹɹ↓ ◦••...•◦...◦••• RubyKaigi 2016 Kyoto
LT (2016-09-10) 27
௨ͬͨʂ RubyKaigi 2016 Kyoto LT (2016-09-10) 28
RubyͰڝϓϩͰ͖Δͧ ! (গͳ͘ͱBeginner ContestͳΒ) RubyKaigi 2016 Kyoto LT (2016-09-10) 29
! ༨ஊ ! RubyKaigi 2016 Kyoto LT (2016-09-10) 30
RubyKaigi 2016 Kyoto LT (2016-09-10) 31
ABC037-D • 1000x1000ͷ໎࿏Λ୳ࡧ͢Δ • νϟϨϯδϟʔٻΉ • Ruby33ഒ͘ͳΔͱ͍͏ᷚͳͷͰ͖ͬͱ௨ΔΑ͏ʹͳΔ ͣʁ RubyKaigi 2016
Kyoto LT (2016-09-10) 32
Crystalͩͱ௨Δ(͕͢͞) ※CrystalɿRubyʹΑ͘ࣅͨ੩తܕ͚ݴޠ RubyKaigi 2016 Kyoto LT (2016-09-10) 33
pypy2௨ͬͯΔ ※pypy2ɿPythonॲཧܥͷҰͭ RubyKaigi 2016 Kyoto LT (2016-09-10) 34
Python3!? RubyKaigi 2016 Kyoto LT (2016-09-10) 35
RubyKaigi 2016 Kyoto LT (2016-09-10) 36
RubyKaigi 2016 Kyoto LT (2016-09-10) 37
RubyKaigi 2016 Kyoto LT (2016-09-10) 38
(ྑ͍ࢠਅࣅ͠ͳ͍Α͏ʹ !) RubyKaigi 2016 Kyoto LT (2016-09-10) 39