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
19k
それは残像だ
yhara
4
4.2k
スモートーク
yhara
0
2.8k
Ovto: Frontend web framework for Rubyists
yhara
0
7.3k
Ruby, Opal and WebAssembly
yhara
2
2.4k
Competitive Programming in Ruby (101)
yhara
0
690
良いデバッグログはプロジェクトの資産である
yhara
54
18k
Let's make a functional language!
yhara
0
6.3k
Recent Updates (近況報告)
yhara
0
610
Other Decks in Programming
See All in Programming
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
2.3k
Beyond ORM
77web
11
1.6k
盆栽転じて家具となる / Bonsai and Furnitures
aereal
0
2.1k
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
360
HTML/CSS超絶浅い説明
yuki0329
0
200
Lookerは可視化だけじゃない。UIコンポーネントもあるんだ!
ymd65536
1
130
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
1
160
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
770
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
250
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
430
rails newと同時に型を書く
aki19035vc
6
730
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
2
7.8k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Documentation Writing (for coders)
carmenintech
67
4.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Code Reviewing Like a Champion
maltzj
521
39k
The Invisible Side of Design
smashingmag
299
50k
Being A Developer After 40
akosma
89
590k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Measuring & Analyzing Core Web Vitals
bluesmoon
5
210
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