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.2k
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
600
Other Decks in Programming
See All in Programming
Haze - Real time background blurring
chrisbanes
1
520
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
720
17年周年のWebアプリケーションにTanStack Queryを導入する / Implementing TanStack Query in a 17th Anniversary Web Application
saitolume
0
250
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
2
410
Monixと常駐プログラムの勘どころ / Scalaわいわい勉強会 #4
stoneream
0
290
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
160
ドメインイベント増えすぎ問題
h0r15h0
2
430
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
730
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
160
php-conference-japan-2024
tasuku43
0
360
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
521
39k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
A Tale of Four Properties
chriscoyier
157
23k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Site-Speed That Sticks
csswizardry
2
190
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
A better future with KSS
kneath
238
17k
Side Projects
sachag
452
42k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
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