SlideShare a Scribd company logo
1 of 28
AtCoder を
布教しに来ました!
3年5組(情報科学・工学系) ****
TwitterID @3_3_nk
自己紹介・近況
■ ソフトウェアテクノロジー部所属
■ 趣味はTwitterです
 @3_3_nk
■ 4月8日、誕生日を迎え18歳に
自己紹介・近況
■ AtCoderのアカウント
 @mmnk_atcoder
 最近茶色コーダーに
なりました!
 連続AC記録更新中
「AtCoder」聞いたことありますか
■ 聞いたことある人は手を挙げてください
問題
■ 三辺の長さ a, b, c がすべて整数値で
ある二等辺三角形があります。
■ a, b が与えられるので、c として
考えられる値のうち最小の値を
求めてください。
■ 1 ≤ a ≤ b ≤ 1000
「競技プログラミング」とは?
■ プログラミングの技術力で競い合うコンテストの総称
■ ある問題に対して、それを解決するプログラムを自力で書く
■ 一口に「競技プログラミング」といっても色々な種類がある
 コーディングの速さを競うものが一般的
 他にもいろいろあるけど今回は割愛
「AtCoder」とは
■ https://atcoder.jp/
■ 競プロのコンテストを不定期で
開催しているウェブサイト
■ だれでも無料で、ウェブ上で
参加できる
 ただし登録が必要
■ 問題文が日本語で書かれている
のでとっつきやすい!
「AtCoder」とは
AtCoder の競技人口
■ AtCoder に一度でもコードを提出したことのある人は
1万人以上
 最近では海外勢も
■ 一回のコンテストの参加人数は数千人程度
 けっこう多い方だと思います
競プロをやるメリット
■ 考える力が身につく
■ 様々なアルゴリズムへの理解が深まる
■
コンテストで出題される問題の例
■ 一個 A 円の商品を N 個買って B 円支払いました
■ お釣りの金額はいくらになるか計算しなさい
問題を解く
入力 処理 出力
問題を解く
入力 処理 出力
■ 数値などの情報を受け取る
 今回の場合「値段A, 個数N, 支払った金額B」
 受け取った情報は変数に保存しておく
問題を解く
入力 処理 出力
■ さっき受け取った数値を使って、具体的な計算をする
 (値段)×(個数)=(総額)
 (支払った金額)-(総額)=(お釣り)
問題を解く
入力 処理 出力
■ 答えとなる情報を出力
 「お釣り」を聞かれているので、「お釣り」を出力
 答えを出力したらプログラムを終了させる
C++ での解答例
提出されたプログラムの判定
■ AtCoder では正解のことを
「AC(Accepted)」という
■ 用意されている全てのテスト
ケースに正解すればAC
 テストケース:「入力」と
「正しい答え」のペア
提出されたプログラムの判定
■ テストケースのうち、1つでも
間違った出力をすると不正解
扱いになる
 不正解は
「WA(Wrong Answer)」
コンテストにおける順位
■ コンテストでは配点の違う問題が複数出題される
■ 「ACした問題の合計点」が高いほど順位も高い
 点数が同じ人がいる場合、ACした時間が速かった順に
順位が付けられる
■ 1回WAを出す度に、5分のペナルティが課せられる
 開始から10分でACしても3回WAを出していると…
コンテストにおける順位
■ つまり
“与えられた問題を解くプログラム”を、
「より早く」「より正確に」
記述できるかどうか
競プロはこんな人にオススメ!
■ パズルを解くのが好きな人
■ 数学が好きな人
■ 物事を考えるのが好きな人
■ とりあえず何かで勝ちたい人
■ プログラミングしたいけど何から
始めればいいかわからない人
結局何から始めればいいの?
■ まずは AtCoder に登録しよう
 詳しい登録の仕方は省略
■ 過去問をたくさん解こう
 今までのコンテストで出題され
た問題は好きな時間に解けます
■ 競プロの参考書を買うのもいいか
も?
みんなで競プロやろうぜ!
■ 質問があったら僕の
Twitter(@3_3_nk)まで
 フォローしてね
最初に出した問題
■ 三辺の長さ a, b, c がすべて整数値で
ある二等辺三角形があります。
■ a, b が与えられるので、c として
考えられる値のうち最小の値を
求めてください。
■ 1 ≤ a ≤ b ≤ 1000
考察
■ a = b なら c の値は何でもいい
 最小値を聞かれているので c = 1
■ a < b なら c の値は a, b のどちらか
 c = a のとき三角形が成立するか調べる
 2a > b が真なら三角形が成立するので c = a
 偽なら c = b (こちらは必ず三角形が成立する)
C++ での解答例
おしまい
ご清聴ありがとうございました

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

AtCoder を布教しに来ました! 2019 - 04 - 11

Editor's Notes

  1. プログラミングに興味がある人や、情報技術基礎のプログラミングが簡単だったなと感じている2年生に聞いてほしい!
  2. 簡潔に~~~
  3. かわいい
  4. 突然ですが、さっそく競技プログラミングの問題を見てもらいます
  5. 3.1:他にも点数をより多く取れるようなプログラムを書く競技や相手と対戦して勝利することを目指す競技など
  6. 画像はAtCoder社社長の高橋直大さん、通称ちょくだいさん
  7. という感じでごちゃごちゃ言われてもわからないと思うので、コンテストで出題される問題の例を具体的に示します
  8. この問題をプログラムではなく手で解けと言われたらできますよね。(方法説明) プログラムで解くには大きく分けて3つのステップがあります。
  9. 1,2行目はおまじないです 5,6行目は入力の部分 8,9行目は処理の部分 11,12行目は出力の部分です
  10. 僕は最後でした
  11. 3つ目は初心者のうちは書きたい言語の参考書を買った方がいいかも