SlideShare una empresa de Scribd logo
1 de 83
Hacks
@cou929
Agenda
•

•

•

    •

    •

    •

    •

    •

    •

•
@cou929

•           (               )

• web

• Web technologies

    • HTML + CSS + JavaScript
•

•

• a.k.a.

    •

    •

    • etc.
.
    n                                .                                      ,
                         4               .             m
                 .                                                      .
                             ,                     ,
                                 .                         k_1, k_2, ..., k_n
             ,       m                                      ,
    ”Yes”,               ”No”                                   .



1 <= n <= 50
1 <= m <= 10^8
1 <= k_i <= 10^8
•                                            1-1
• n = 3, m = 10, k = {1, 2, 3, 5}

 • “Yes” ({1, 1, 3, 5}   )




• n = 3, m = 9, k = {1, 3, 5}

 • “No”
•


•



•



    •
•


    •


•4


    •     n      50



    • 1 <= n <= 1000   ?
TopCoder
•                     (       2, 3   )

    •                     !

• 1         2   3

•               (C++, Java, C#, VB)

•

• TopCoder

        •

        •       NASA

• http://www.topcoder.com/tc
Google Code Jam
•

• 2        3

    •                      2

•

• Google

    •             ?

• http://code.google.com/codejam
ACM ICPC
•

•

•

•

•                           ><

• http://cm.baylor.edu/welcome.icpc
• CodeForces

  • http://codeforces.ru/

• CodeChef

  • http://www.codechef.com/

• ICFP Programing Contest

  • http://icfpcontest.org/

• etc.
•            ,

    • ICPC

•

    •

•

•
• PKU Judge Online

 • http://acm.pku.edu.cn/JudgeOnline/

• Sphere online judge

 • http://www.spoj.pl/

• AIZU Online Judge

 • http://rose.u-aizu.ac.jp/onlinejudge/
•

•

•

•

•

•
•

    •   ,   ,

•

    •

    •

•

    •
•

•

•
•       “   ”

    •

    •
                ,

•
•

•

•
•   ->   ->   ! ->



•   ->   ->          !




•

•
•             ->    ->
    ->             ->    ->
         ->




•

•
•

    •   O-

•

•
O-
•

    •     O(log n), O(n^3)

•

    •

    •

    • 3   -> O(n^3)          !

•

    •           .
•                 ,n        50

•                  O(n^4)

    • 6,250,000
•          2


     1,000,000

    100,000,000

    1,000,000,000
•

•

    •     (dfs)

    •   (bfs)

•

    •

    •
:
 • O(n^4)

 • n=3



               n1                  n2             n3



     n1        n2   n3        n1   n2   n3   n1   n2   n3



n1   n2   n3        n1   n2   n3    ……
                               ……
•   http://www.itmedia.co.jp/enterprise/articles/1001/16/news001.html
•   ,



•

•
:
     a1, a2, ..., an       .             ,
         k                           .



1 <= n <= 20
- 10^8 <= a_i <= 10^8
- 10^8 <= k <= 10^8



n=4
a = {1, 2, 4, 7}
k = 13

"Yes" (2 + 4 + 7)


•                              2-1
•          a_i         ,   /

•        a_i



•          O(2^n)

•n             20

• 2 ^ 20 = 1,048,576
•   “                            :                       -        ”   (http://
    www.itmedia.co.jp/enterprise/articles/1001/16/news001.html)
•

    • dfs

•

    • dfs                bfs

      •

•           O(   *   )
:

•
     :



• http://okajima.air-
  nifty.com/b/2010/01/
  post-abc6.html
:



                         ,         N, M                   .
N = M = 50




• http://okajima.air-nifty.com/b/2010/01/post-abc6.html
:
                   **************************
                   *S* *                       *
                   * * * * ************* *
                   * *     *      ************ *
                   *     *                     *
                   ************** ***********
                   *                           *
                   ** ***********************
                   *         *               G *
                   * *           *********** * *
                   *     *           ******* * *
                   *           *               *
                   **************************


• http://okajima.air-nifty.com/b/2010/01/post-abc6.html
:
                   **************************
                   *S* * $$$                *
                   *$* *$$*$ ************* *
                   *$* $$* $$$************ *
                   *$$$$*    $$$$$          *
                   **************$***********
                   * $$$$$$$$$$$$$          *
                   **$***********************
                   * $$$$$*$$$$$$$$$$$$$$G *
                   * * $$$ *********** * *
                   *    *        ******* * *
                   *       *                *
                   **************************


• http://okajima.air-nifty.com/b/2010/01/post-abc6.html
•         N*M

•             4

•                  O(N * M * 4)

• 50 * 50 * 4 = 10,000
•                     ,



•       :

    •          m

•           dfs bfs

•
• Binary Search

•

•         O(log(n))
•   http://www.gutterbucket.com/general-code/binary-search.html
• Dynamic Programming,   DP

•              ,



•
:


      w         v           N        ,               W
                 .      ,                W      ,
                                 .




• “ALGORITHM NOTE           ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
•N                       /
     2

• O(2^N)

•N         100   , 2^100 = 10^30
DP

• (N+1) * (W+1)       C

• C[i][w]         w       0
       i
• C[i][w]         2

 • C[i - 1][w -       i   ]+   i

 • C[i - 1][w]
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• “ALGORITHM NOTE       ”   (http://algorithms.blog55.fc2.com/
  blog-entry-85.html)
• (N+1) * (W+1)

• O(NW)

•
DP

•        ,



•
DP
•

•

•

•

• etc...
• Greedy Algorithm

•                    ,

    •

•

    •
:


100




• “                            :                           -                ”
      (http://www.itmedia.co.jp/enterprise/articles/1009/04/news002.html)
Greedy

•                   ,



• 15436 = {10000, 5000, 100, 100, 100,
  100, 10, 10, 10, 5, 1}
• {1, 6, 13}

• 18

 • {13, 1, 1, 1, 1, 1}

 • {6, 6, 6}
•

•



•

    •
•

    •

    •

•

    •

    •

• etc...
• TopCoder



    •

•

    • http://topcoder.g.hatena.ne.jp/keyword/Challenge



•          ,
•0

•

•

    •

    •
•                       3



    • @iwiwi, @wata_orz, @kita__masa

•



•



• http://www.amazon.co.jp/
                                 -
       -    /dp/4839931992
•


•
Algorithm Tutorials
• TopCoder



•


•


•


• http://www.topcoder.com/tc?
  module=Static&d1=tutorials
  &d2=alg_index
• chokudai


    • Imagine Cup   3



•


    •
        ,



• http://www.itmedia.co.jp/
  keywords/algorithmer.html
• @kinaba



•              DP



    • http://www.kmonos.net/
      wlog/89.html#_2049080923

    • http://www.kmonos.net/
      wlog/90.html#_1712081024

    • http://www.kmonos.net/
      wlog/91.html#_2024081109
• @kinaba          topcoder-jp


    • http://twitter.com/#/list/kinaba/topcoder-jp

    •


•                  (              )


    • http://topcoder.g.hatena.ne.jp/

    •


    •    60
• Introduction To TopCoder,              TopCoder


    • http://d.hatena.ne.jp/cou929_la/
      20091005/1254725798

•


    • http://d.hatena.ne.jp/cou929_la/
      20100708/1278600922
Programming Contest Hacks

Más contenido relacionado

La actualidad más candente

Nghien cuu cong_nghe_sx_dich_dam,_bot_ca
Nghien cuu cong_nghe_sx_dich_dam,_bot_caNghien cuu cong_nghe_sx_dich_dam,_bot_ca
Nghien cuu cong_nghe_sx_dich_dam,_bot_casaomai491
 
Hajj or Umra by Shykh Bin Baz
Hajj or Umra by Shykh Bin BazHajj or Umra by Shykh Bin Baz
Hajj or Umra by Shykh Bin BazFahad Javed
 
Cameroun - Repertoire des projets prioritaires à besoins de financement
Cameroun - Repertoire des projets prioritaires à besoins de financementCameroun - Repertoire des projets prioritaires à besoins de financement
Cameroun - Repertoire des projets prioritaires à besoins de financementinvestincameroon
 
Etransformation de l'éducation avant le bac
Etransformation de l'éducation avant le bacEtransformation de l'éducation avant le bac
Etransformation de l'éducation avant le bacBenoit Paul Max
 
Report of the Export Group on the methodology for the people below the povert...
Report of the Export Group on the methodology for the people below the povert...Report of the Export Group on the methodology for the people below the povert...
Report of the Export Group on the methodology for the people below the povert...People's Archive of Rural India
 
Moosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimizedMoosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimizedHeinrich Seeger
 
Dialnet el complementodirectopreposicionalenelcastellanodel-918722
Dialnet el complementodirectopreposicionalenelcastellanodel-918722Dialnet el complementodirectopreposicionalenelcastellanodel-918722
Dialnet el complementodirectopreposicionalenelcastellanodel-918722arpad203
 
التأصيل الطبي للضرورة الطبية
التأصيل الطبي للضرورة الطبيةالتأصيل الطبي للضرورة الطبية
التأصيل الطبي للضرورة الطبيةDr Ghaiath Hussein
 
A Little Bit Of Insight 2011
A Little Bit Of Insight 2011A Little Bit Of Insight 2011
A Little Bit Of Insight 2011Marrianne Garbutt
 
Tecnicas de sql injection
Tecnicas de sql injectionTecnicas de sql injection
Tecnicas de sql injectionAlan Resendiz
 
Global Change, Species Diversity, and the Future of Marine Ecosystems
Global Change, Species Diversity, and the Future of Marine EcosystemsGlobal Change, Species Diversity, and the Future of Marine Ecosystems
Global Change, Species Diversity, and the Future of Marine EcosystemsJarrett Byrnes
 
Technorati Blogging Stats Preview
Technorati Blogging Stats PreviewTechnorati Blogging Stats Preview
Technorati Blogging Stats PreviewEric Schwartzman
 
Dipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoireDipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoireAchraf Ourti
 
Nic newman tiger spike mobile publishing masterclass
Nic newman tiger spike mobile publishing masterclassNic newman tiger spike mobile publishing masterclass
Nic newman tiger spike mobile publishing masterclassJames Cameron
 
PR Campaign Proposal
PR Campaign ProposalPR Campaign Proposal
PR Campaign Proposalkre01
 
Replica Sets
Replica SetsReplica Sets
Replica SetsMongoDB
 

La actualidad más candente (20)

Matrices, Matrix
Matrices, MatrixMatrices, Matrix
Matrices, Matrix
 
Nghien cuu cong_nghe_sx_dich_dam,_bot_ca
Nghien cuu cong_nghe_sx_dich_dam,_bot_caNghien cuu cong_nghe_sx_dich_dam,_bot_ca
Nghien cuu cong_nghe_sx_dich_dam,_bot_ca
 
Hajj or Umra by Shykh Bin Baz
Hajj or Umra by Shykh Bin BazHajj or Umra by Shykh Bin Baz
Hajj or Umra by Shykh Bin Baz
 
Cameroun - Repertoire des projets prioritaires à besoins de financement
Cameroun - Repertoire des projets prioritaires à besoins de financementCameroun - Repertoire des projets prioritaires à besoins de financement
Cameroun - Repertoire des projets prioritaires à besoins de financement
 
Who was william shakespeare ?
Who was william shakespeare ?Who was william shakespeare ?
Who was william shakespeare ?
 
Etransformation de l'éducation avant le bac
Etransformation de l'éducation avant le bacEtransformation de l'éducation avant le bac
Etransformation de l'éducation avant le bac
 
Report of the Export Group on the methodology for the people below the povert...
Report of the Export Group on the methodology for the people below the povert...Report of the Export Group on the methodology for the people below the povert...
Report of the Export Group on the methodology for the people below the povert...
 
Moosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimizedMoosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimized
 
If you can
If you canIf you can
If you can
 
Ecuacionesfuncionales2 1
Ecuacionesfuncionales2 1Ecuacionesfuncionales2 1
Ecuacionesfuncionales2 1
 
Dialnet el complementodirectopreposicionalenelcastellanodel-918722
Dialnet el complementodirectopreposicionalenelcastellanodel-918722Dialnet el complementodirectopreposicionalenelcastellanodel-918722
Dialnet el complementodirectopreposicionalenelcastellanodel-918722
 
التأصيل الطبي للضرورة الطبية
التأصيل الطبي للضرورة الطبيةالتأصيل الطبي للضرورة الطبية
التأصيل الطبي للضرورة الطبية
 
A Little Bit Of Insight 2011
A Little Bit Of Insight 2011A Little Bit Of Insight 2011
A Little Bit Of Insight 2011
 
Tecnicas de sql injection
Tecnicas de sql injectionTecnicas de sql injection
Tecnicas de sql injection
 
Global Change, Species Diversity, and the Future of Marine Ecosystems
Global Change, Species Diversity, and the Future of Marine EcosystemsGlobal Change, Species Diversity, and the Future of Marine Ecosystems
Global Change, Species Diversity, and the Future of Marine Ecosystems
 
Technorati Blogging Stats Preview
Technorati Blogging Stats PreviewTechnorati Blogging Stats Preview
Technorati Blogging Stats Preview
 
Dipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoireDipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoire
 
Nic newman tiger spike mobile publishing masterclass
Nic newman tiger spike mobile publishing masterclassNic newman tiger spike mobile publishing masterclass
Nic newman tiger spike mobile publishing masterclass
 
PR Campaign Proposal
PR Campaign ProposalPR Campaign Proposal
PR Campaign Proposal
 
Replica Sets
Replica SetsReplica Sets
Replica Sets
 

Destacado

Object meta-level control on ECMA Script 5
Object meta-level control on ECMA Script 5Object meta-level control on ECMA Script 5
Object meta-level control on ECMA Script 5Kosei Moriyama
 
Survey of the Ontology - オントロジーについての調査
Survey of the Ontology - オントロジーについての調査Survey of the Ontology - オントロジーについての調査
Survey of the Ontology - オントロジーについての調査Kosei Moriyama
 
Introduction To Google App Engine
Introduction To Google App EngineIntroduction To Google App Engine
Introduction To Google App EngineKosei Moriyama
 
Firefox 学生向けアドオンパック
Firefox 学生向けアドオンパックFirefox 学生向けアドオンパック
Firefox 学生向けアドオンパックKosei Moriyama
 
Chrome Web Store に登録してみた
Chrome Web Store に登録してみたChrome Web Store に登録してみた
Chrome Web Store に登録してみたKosei Moriyama
 
C言語演習(2) - OpenCV
C言語演習(2) - OpenCV C言語演習(2) - OpenCV
C言語演習(2) - OpenCV Kosei Moriyama
 

Destacado (7)

Object meta-level control on ECMA Script 5
Object meta-level control on ECMA Script 5Object meta-level control on ECMA Script 5
Object meta-level control on ECMA Script 5
 
C language Sem 01
C language Sem 01C language Sem 01
C language Sem 01
 
Survey of the Ontology - オントロジーについての調査
Survey of the Ontology - オントロジーについての調査Survey of the Ontology - オントロジーについての調査
Survey of the Ontology - オントロジーについての調査
 
Introduction To Google App Engine
Introduction To Google App EngineIntroduction To Google App Engine
Introduction To Google App Engine
 
Firefox 学生向けアドオンパック
Firefox 学生向けアドオンパックFirefox 学生向けアドオンパック
Firefox 学生向けアドオンパック
 
Chrome Web Store に登録してみた
Chrome Web Store に登録してみたChrome Web Store に登録してみた
Chrome Web Store に登録してみた
 
C言語演習(2) - OpenCV
C言語演習(2) - OpenCV C言語演習(2) - OpenCV
C言語演習(2) - OpenCV
 

Similar a Programming Contest Hacks

Py "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotech
Py "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotechPy "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotech
Py "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotechShinichi Nakagawa
 
Leadership Guide, 초보팀장을 위한 리더십 가이드
Leadership Guide, 초보팀장을 위한 리더십 가이드Leadership Guide, 초보팀장을 위한 리더십 가이드
Leadership Guide, 초보팀장을 위한 리더십 가이드Jinho Jung
 
Steering Iterative and Incremental Delivery with Jeff Patton
Steering Iterative and Incremental Delivery with Jeff PattonSteering Iterative and Incremental Delivery with Jeff Patton
Steering Iterative and Incremental Delivery with Jeff PattonUIEpreviews
 
Mining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social HaystackMining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social HaystackMatthew Russell
 
第5回NIPS読み会・関西発表資料
第5回NIPS読み会・関西発表資料第5回NIPS読み会・関西発表資料
第5回NIPS読み会・関西発表資料Kyoichiro Kobayashi
 
신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...
신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...
신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...Amazon Web Services Korea
 
Casual-Talk #1 青虫の生態について
Casual-Talk #1 青虫の生態についてCasual-Talk #1 青虫の生態について
Casual-Talk #1 青虫の生態についてAzusa Onishi
 
App과 Server의 은밀한 대화
App과 Server의 은밀한 대화App과 Server의 은밀한 대화
App과 Server의 은밀한 대화Rock Kang
 
katagaitai CTF workshop #10 AESに対する相関電力解析
katagaitai CTF workshop #10 AESに対する相関電力解析katagaitai CTF workshop #10 AESに対する相関電力解析
katagaitai CTF workshop #10 AESに対する相関電力解析trmr
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go ProgrammingLin Yo-An
 
Training evaluation workshop ver 00
Training evaluation workshop ver 00Training evaluation workshop ver 00
Training evaluation workshop ver 00Reza Seifollahy
 
[DL輪読会]Tracking Emerges by Colorizing Videos
[DL輪読会]Tracking Emerges by Colorizing Videos[DL輪読会]Tracking Emerges by Colorizing Videos
[DL輪読会]Tracking Emerges by Colorizing VideosDeep Learning JP
 
Improve Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday AdminImprove Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday AdminEve Lyons-Berg
 
Improve Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday AdminImprove Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday AdminAggregage
 
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) :: 한국 카오스엔지니어링 밋업
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) ::  한국 카오스엔지니어링 밋업Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) ::  한국 카오스엔지니어링 밋업
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) :: 한국 카오스엔지니어링 밋업Channy Yun
 
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・MobyAkihiro Suda
 

Similar a Programming Contest Hacks (20)

Py "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotech
Py "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotechPy "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotech
Py "Baseball" Data入門〜サービス(と野球)を支えるデータ分析基盤 #monotarotech
 
Leadership Guide, 초보팀장을 위한 리더십 가이드
Leadership Guide, 초보팀장을 위한 리더십 가이드Leadership Guide, 초보팀장을 위한 리더십 가이드
Leadership Guide, 초보팀장을 위한 리더십 가이드
 
Tabledown
TabledownTabledown
Tabledown
 
Steering Iterative and Incremental Delivery with Jeff Patton
Steering Iterative and Incremental Delivery with Jeff PattonSteering Iterative and Incremental Delivery with Jeff Patton
Steering Iterative and Incremental Delivery with Jeff Patton
 
Mining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social HaystackMining the Geo Needles in the Social Haystack
Mining the Geo Needles in the Social Haystack
 
第5回NIPS読み会・関西発表資料
第5回NIPS読み会・関西発表資料第5回NIPS読み会・関西発表資料
第5回NIPS読み会・関西発表資料
 
신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...
신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...
신뢰성 높은 클라우드 기반 서비스 운영을 위한 Chaos Engineering in Action (윤석찬, AWS 테크에반젤리스트) :: ...
 
Onsg10 Intro Termtter
Onsg10 Intro TermtterOnsg10 Intro Termtter
Onsg10 Intro Termtter
 
Casual-Talk #1 青虫の生態について
Casual-Talk #1 青虫の生態についてCasual-Talk #1 青虫の生態について
Casual-Talk #1 青虫の生態について
 
App과 Server의 은밀한 대화
App과 Server의 은밀한 대화App과 Server의 은밀한 대화
App과 Server의 은밀한 대화
 
Czzawk
CzzawkCzzawk
Czzawk
 
Vim - Amazing Editor for DBAs
Vim - Amazing Editor for DBAsVim - Amazing Editor for DBAs
Vim - Amazing Editor for DBAs
 
katagaitai CTF workshop #10 AESに対する相関電力解析
katagaitai CTF workshop #10 AESに対する相関電力解析katagaitai CTF workshop #10 AESに対する相関電力解析
katagaitai CTF workshop #10 AESに対する相関電力解析
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go Programming
 
Training evaluation workshop ver 00
Training evaluation workshop ver 00Training evaluation workshop ver 00
Training evaluation workshop ver 00
 
[DL輪読会]Tracking Emerges by Colorizing Videos
[DL輪読会]Tracking Emerges by Colorizing Videos[DL輪読会]Tracking Emerges by Colorizing Videos
[DL輪読会]Tracking Emerges by Colorizing Videos
 
Improve Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday AdminImprove Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday Admin
 
Improve Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday AdminImprove Your Salesforce Efficiency: Formulas for the Everyday Admin
Improve Your Salesforce Efficiency: Formulas for the Everyday Admin
 
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) :: 한국 카오스엔지니어링 밋업
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) ::  한국 카오스엔지니어링 밋업Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) ::  한국 카오스엔지니어링 밋업
Game Day in Action for Chaos Engineering - 윤석찬 (AWS 테크에반젤리스트) :: 한국 카오스엔지니어링 밋업
 
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
[表示が崩れる場合ダウンロードしてご覧ください] 2018年のDocker・Moby
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Programming Contest Hacks

  • 2. Agenda • • • • • • • • • •
  • 3.
  • 4. @cou929 • ( ) • web • Web technologies • HTML + CSS + JavaScript
  • 5.
  • 6. • • • a.k.a. • • • etc.
  • 7. . n . , 4 . m . . , , . k_1, k_2, ..., k_n , m , ”Yes”, ”No” . 1 <= n <= 50 1 <= m <= 10^8 1 <= k_i <= 10^8 • 1-1
  • 8. • n = 3, m = 10, k = {1, 2, 3, 5} • “Yes” ({1, 1, 3, 5} ) • n = 3, m = 9, k = {1, 3, 5} • “No”
  • 9.
  • 10. • • •
  • 11. • •4 • n 50 • 1 <= n <= 1000 ?
  • 12.
  • 13. TopCoder • ( 2, 3 ) • ! • 1 2 3 • (C++, Java, C#, VB) • • TopCoder • • NASA • http://www.topcoder.com/tc
  • 14. Google Code Jam • • 2 3 • 2 • • Google • ? • http://code.google.com/codejam
  • 15. ACM ICPC • • • • • >< • http://cm.baylor.edu/welcome.icpc
  • 16. • CodeForces • http://codeforces.ru/ • CodeChef • http://www.codechef.com/ • ICFP Programing Contest • http://icfpcontest.org/ • etc.
  • 17. , • ICPC • • • •
  • 18. • PKU Judge Online • http://acm.pku.edu.cn/JudgeOnline/ • Sphere online judge • http://www.spoj.pl/ • AIZU Online Judge • http://rose.u-aizu.ac.jp/onlinejudge/
  • 19.
  • 21. • , , • • • • •
  • 23. “ ” • • , •
  • 24.
  • 26. -> -> ! -> • -> -> ! • •
  • 27. -> -> -> -> -> -> • •
  • 28. • O- • •
  • 29. O- • • O(log n), O(n^3) • • • • 3 -> O(n^3) ! • • .
  • 30. ,n 50 • O(n^4) • 6,250,000
  • 31. 2 1,000,000 100,000,000 1,000,000,000
  • 32. • • • (dfs) • (bfs) • • •
  • 33. : • O(n^4) • n=3 n1 n2 n3 n1 n2 n3 n1 n2 n3 n1 n2 n3 n1 n2 n3 n1 n2 n3 …… ……
  • 34. http://www.itmedia.co.jp/enterprise/articles/1001/16/news001.html
  • 35. , • •
  • 36. : a1, a2, ..., an . , k . 1 <= n <= 20 - 10^8 <= a_i <= 10^8 - 10^8 <= k <= 10^8 n=4 a = {1, 2, 4, 7} k = 13 "Yes" (2 + 4 + 7) • 2-1
  • 37. a_i , / • a_i • O(2^n) •n 20 • 2 ^ 20 = 1,048,576
  • 38.
  • 39. “ : - ” (http:// www.itmedia.co.jp/enterprise/articles/1001/16/news001.html)
  • 40. • dfs • • dfs bfs • • O( * )
  • 41. : • : • http://okajima.air- nifty.com/b/2010/01/ post-abc6.html
  • 42. : , N, M . N = M = 50 • http://okajima.air-nifty.com/b/2010/01/post-abc6.html
  • 43. : ************************** *S* * * * * * * ************* * * * * ************ * * * * ************** *********** * * ** *********************** * * G * * * *********** * * * * ******* * * * * * ************************** • http://okajima.air-nifty.com/b/2010/01/post-abc6.html
  • 44. : ************************** *S* * $$$ * *$* *$$*$ ************* * *$* $$* $$$************ * *$$$$* $$$$$ * **************$*********** * $$$$$$$$$$$$$ * **$*********************** * $$$$$*$$$$$$$$$$$$$$G * * * $$$ *********** * * * * ******* * * * * * ************************** • http://okajima.air-nifty.com/b/2010/01/post-abc6.html
  • 45. N*M • 4 • O(N * M * 4) • 50 * 50 * 4 = 10,000
  • 46.
  • 47. , • : • m • dfs bfs •
  • 49. http://www.gutterbucket.com/general-code/binary-search.html
  • 50. • Dynamic Programming, DP • , •
  • 51. : w v N , W . , W , . • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 52. •N / 2 • O(2^N) •N 100 , 2^100 = 10^30
  • 53. DP • (N+1) * (W+1) C • C[i][w] w 0 i
  • 54. • C[i][w] 2 • C[i - 1][w - i ]+ i • C[i - 1][w]
  • 55. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 56. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 57. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 58. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 59. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 60. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 61. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 62. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 63. • “ALGORITHM NOTE ” (http://algorithms.blog55.fc2.com/ blog-entry-85.html)
  • 64. • (N+1) * (W+1) • O(NW) •
  • 65. DP • , •
  • 67. • Greedy Algorithm • , • • •
  • 68. : 100 • “ : - ” (http://www.itmedia.co.jp/enterprise/articles/1009/04/news002.html)
  • 69. Greedy • , • 15436 = {10000, 5000, 100, 100, 100, 100, 10, 10, 10, 5, 1}
  • 70. • {1, 6, 13} • 18 • {13, 1, 1, 1, 1, 1} • {6, 6, 6}
  • 71. • • •
  • 72. • • • • • • etc...
  • 73. • TopCoder • • • http://topcoder.g.hatena.ne.jp/keyword/Challenge • ,
  • 74. •0 • • • •
  • 75.
  • 76. 3 • @iwiwi, @wata_orz, @kita__masa • • • http://www.amazon.co.jp/ - - /dp/4839931992
  • 78. Algorithm Tutorials • TopCoder • • • • http://www.topcoder.com/tc? module=Static&d1=tutorials &d2=alg_index
  • 79. • chokudai • Imagine Cup 3 • • , • http://www.itmedia.co.jp/ keywords/algorithmer.html
  • 80. • @kinaba • DP • http://www.kmonos.net/ wlog/89.html#_2049080923 • http://www.kmonos.net/ wlog/90.html#_1712081024 • http://www.kmonos.net/ wlog/91.html#_2024081109
  • 81. • @kinaba topcoder-jp • http://twitter.com/#/list/kinaba/topcoder-jp • • ( ) • http://topcoder.g.hatena.ne.jp/ • • 60
  • 82. • Introduction To TopCoder, TopCoder • http://d.hatena.ne.jp/cou929_la/ 20091005/1254725798 • • http://d.hatena.ne.jp/cou929_la/ 20100708/1278600922

Notas del editor