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
DevTools extensions で 独自の DevTool を開発する | FlutterKaigi 2024
kokiyoshida
0
130
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
730
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
C++でシェーダを書く
fadis
6
4.1k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
rails new flags - `rails new` のフラグから Rails を構成するコンポーネントの変遷をザックリ眺める
snaka
0
1.8k
距離関数を極める! / SESSIONS 2024
gam0022
0
300
WebAssembly Unleashed: Powering Server-Side Applications
chrisft25
0
130
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Producing Creativity
orderedlist
PRO
341
39k
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