Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What are AtCoder and competitive programming

What are AtCoder and competitive programming

きりみん

August 16, 2019
Tweet

More Decks by きりみん

Other Decks in Programming

Transcript

  1. ͔̌Β̑෼ͰΘ͔Δ
    AtCoderͱ
    ڝٕϓϩάϥϛϯά
    @kirimin_chan

    View full-size slide

  2. ࣗݾ঺հ
    • όʔνϟϧ༮ঁϓϩάϥϚͷ͖ΓΈΜͪΌΜͰ
    ͢ʂ
    • ڝٕϓϩάϥϛϯάॳ৺ऀͰ͢
    • ߴϨʔτίʔμʔΛ໨ࢦͯ͠मߦதʂ
    • ຖिAtCoderͷաڈ໰Λղ͘഑৴Λ΍ͬͯΔΑʂ

    View full-size slide

  3. AtCoderͬͯͳʹʁ
    • AtCoder͸ΦϯϥΠϯͰࢀՃͰ͖Δڝٕϓϩ
    άϥϛϯάͷαΠτͷ໊લͩΑ
    • ΄΅ຖिίϯςετ͕։࠵͞Ε͍ͯͯɺ୭Ͱ
    ΋ແྉͰ؆୯ʹࢀՃͰ͖ΔΑ
    • աڈ໰ʹ͸͍ͭͰ΋௅ઓͰ͖ΔΑ

    View full-size slide

  4. ڝٕϓϩάϥϛϯάͬͯͳʹʁ
    • ڝٕϓϩάϥϛϯά͸ɺग़୊͞Εͨ৚݅Λຬͨ͢
    ϓϩάϥϜΛղ͘εϐʔυ΍ਖ਼֬͞Λڝ͏ϓϩά
    ϥϛϯάΛ࢖͏ڝٕͩΑ
    • ڝϓϩͱ͔ϓϩάϥϛϯάίϯςετͱ͔ݴͬͨ
    Γ΋͢ΔΑ
    • Web্Ͱ୭Ͱ΋؆୯ʹࢀՃͰ͖Δෑډͷ௿͍ڝٕ
    ͩΑ

    View full-size slide

  5. ϓϩάϥϛϯάͬͯͳʹʁ
    • ΞϓϦ΍ίϯϐϡʔλʔΛಈ͔ͨ͢Ίͷ໋ྩ
    จͷ͜ͱͩΑ
    • WebαΠτ΋εϚϗΞϓϦ΋ςϨϏήʔϜ΋
    ϓϩάϥϛϯάΛ࢖ͬͯ࡞ΒΕ͍ͯΔΑ
    • Ή͔ͣͦ͠͏ʹݟ͑Δ͚Ͳɺ࢝ΊΔͷʹඞཁ
    ͳ஌ࣝ͸গͳ͘୭Ͱ΋͙͢ʹ࢝ΊΒΕΔΑʂ

    View full-size slide

  6. val time = getTime() ←ίϯϐϡʔλʔ͔Β࣌ؒΛऔಘ͢Δ
    if (time >= 12) {ɹˡ΋͠΋12ͱಉ͔ͦ͡ΕΑΓ΋େ͖͔ͬͨΒ
    show("ޕޙͩΑ")ɹˡʮޕޙͩΑʯͱը໘ʹදࣔ͢Δ
    } else {ɹˡ͕ͪͬͨΒ
    show("ޕલͩΑ")ɹˡʮޕલͩΑʯͱը໘ʹදࣔ͢Δ
    }
    ϓϩάϥϛϯάͷΠϝʔδ
    • ϓϩάϥϛϯάͬͯ͜Μͳײ͡ͷ΋ͷͩΑ

    (͘͢͝؆ུԽͨ͠ϓϩάϥϜͷίʔυ)

    View full-size slide

  7. ࣮ࡍʹڝٕϓϩάϥϛϯάͰॻ
    ͘ϓϩάϥϜ

    View full-size slide

  8. ڝٕϓϩάϥϛϯάͷԿָ͕͠
    ͍ͷʁ
    • ύζϧͷΑ͏ʹΉ͔͍ͣ͠໰୊Λ͔Μ͕͑ͯ
    ղ͘ͷ͕ͨͷ͍͠
    • ରઓήʔϜͷΑ͏ʹϓϩάϥϛϯάͷ݁Ռʹ
    είΞ(Ϩʔτ΍ॱҐ)͕ग़Δͷ͕ͨͷ͍͠
    • ͍Ζ͍ΖͳϓϩάϥϛϯάͷςΫχοΫΛֶ
    Ϳ͜ͱ͕Ͱ͖Δ

    View full-size slide

  9. ڝٕϓϩάϥϛϯά≠ιϑτ
    ΢ΣΞ։ൃ
    • ڝٕϓϩάϥϛϯά͕ग़དྷͯ΋ΞϓϦ΍ήʔ
    ϜͳͲͷιϑτ΢ΣΞ͕࡞ΕΔΘ͚Ͱ͸ͳ͍
    • ٯʹΞϓϦ΍ήʔϜ͕࡞Εͯ΋ڝٕϓϩάϥ
    ϛϯά͕ڧ͍ͱ͸ݶΒͳ͍
    • Ͱ΋ڝٕϓϩάϥϛϯά͸ϓϩάϥϛϯάͷ
    ษڧʹͳΔ͠ɺιϑτ΢ΣΞ։ൃʹ໾ཱͭ

    View full-size slide

  10. ۩ମతʹͲΜͳ໰୊Λղ͘ͷʁ
    • ϓϩάϥϛϯάͷجૅ͕෼͔Ε͹͙͢ʹղ͚
    Δ໰୊͔Βɺߴ౓ͳϓϩάϥϛϯάςΫχο
    Ϋ΍਺ֶͷ஌͕ࣝඞཁͳϨϕϧͷ໰୊·Ͱ
    ৭ʑ͋ΔΑ
    • ϓϩάϥϛϯάॳ৺ऀ΍਺ֶͷ஌͕ࣝͳͯ͘
    ΋ղ͚ΔϨϕϧͷ໰୊΋ͨ͘͞Μ͋ΔΑ

    View full-size slide

  11. ۩ମతʹͲΜͳ໰୊Λղ͘ͷʁ
    Ҿ༻ݩɿAtCoder Beginner Contest

    A - Addition and Subtraction Easy

    View full-size slide

  12. ͭ·ΓͲ͏͍͏͜ͱʁ
    • 2ͭͷ਺ࣈͱʮ+ʯ͔ʮ-ʯͷه߸͕౉͞ΕΔͷ
    Ͱɺ଍͠ࢉ͔Ҿ͖ࢉΛͯ݁͠ՌΛฦ͠ͳ͍͞
    ͱ͍͏໰୊

    View full-size slide

  13. AtCoderͷಛ௃
    • ೔ຊͷαΠτ͔ͩΒ໰୊΋ղઆ΋೔ຊޠʂ
    • ؆୯ͳ໰୊͔Β೉͍͠໰୊·Ͱͨ͘͞Μ͋Δ
    • աڈ໰͸͍ͭͰ΋௅ઓ͢Δ͜ͱ͕Ͱ͖Δ
    • ڝٕϓϩάϥϛϯά͸C++΍PythonͳͲͷݴޠͰ
    ղ͘ਓ͕ଟ͍͕ɺAtCoder͸Java΍RubyͳͲॳ৺
    ऀʹਓؾͷ͍Ζ͍Ζͳݴޠʹ΋ରԠ͍ͯ͠Δʂ

    View full-size slide

  14. AtCoderͷಛ௃
    • Beginner Contest(ABC)΍Regular Contest(ARC)
    ͳͲ͍͔ͭ͘ͷϨϕϧͷίϯςετ͕͋Δ
    • ABCͰ΋͢΂ͯͷ໰୊͕ղ͚ͨΒWebϓϩάϥ
    Ϛʔͱͯ͠͸ΦʔόʔεϖοΫͳ͘Β͍ͷϨϕϧ
    ײ
    • ͖ΓΈΜͪΌΜ͕ීஈ௅ઓͯ͠Δͷ΋ABC

    View full-size slide

  15. AtCoderͷಛ௃
    • ίϯςετຊ൪ͷ੒੷ʹΑͬͯϨʔτ͕෇͘
    • ϨʔτʹΑͬͯ৭෼͚͞Ε͍ͯͯɺAtCoderຽ͸৭Ͱࣗ෼ͷڧ͞Λදݱ͢Δ
    • փɿॳظ৭
    • ஡ɿී௨ʹϓϩάϥϛϯά͕ಘҙ
    • ྘ɿϓϩάϥϚʔͱͯ͠όϦόϦ࢓ࣄ͕Ͱ͖Δ
    • ਫɿී௨ͷϓϩάϥϚʔͱͯ͠͸จ۟ͳ͠ͷ࣮ྗ
    • ੨ɿߴ౓ͳϓϩάϥϛϯά͕ඞཁͳ෼໺ͷ։ൃͰ׆༂Ͱ͖Δ

    View full-size slide

  16. Ͳ͏΍ͬͯ͸͡ΊΔͷʁ
    • ϓϩάϥϛϯά͕Ͱ͖ΔͳΒAtCoderͷαΠτͰ
    ొ࿥͢Δ͚ͩʂ
    • ίϯςετ͸͍͍ͩͨຖि౔೔ʹ։࠵͞Ε͍ͯΔ
    ͷͰɺࢀՃొ࿥ͯͦ͠ͷ࣌ؒʹαΠτʹΞΫηε
    ͢Δ͚ͩʂ
    • ϓϩάϥϛϯά͕෼͔Βͳ͚Ε͹ϓϩάϥϛϯά
    ͷೖ໳ॻΛങͬͯΈΑ͏ʂ

    View full-size slide

  17. ҰॹʹڝٕϓϩάϥϛϯάΛ
    ͨͷ͠΋͏ʂ

    View full-size slide

  18. ڵຯ͕ग़ͨΒ
    ʮ͖ΓΈΜͪΌΜͶΔʯ
    ͷಈը΍഑৴ΛݟͯΈͯͶʂ
    YouTubeͰʮ͖ΓΈΜͪΌΜ
    ͶΔʯͰݕࡧ✨✨✨

    View full-size slide