Olympiad

    [백준/17009번] Winning Score  ( CCC 2019 Junior Division)[Java]

    [백준/17009번] Winning Score ( CCC 2019 Junior Division)[Java]

    Problem You record all of the scoring activity at a basketball game. Points are scored by a 3-point shot, a 2-point field goal, or a 1-point free throw. You know the number of each of these types of scoring for the two teams: the Apples and the Bananas. Your job is to determine which team won, or if the game ended in a tie. Input The first three lines of input describe the scoring of the Apples,..

    [백준/ 16787번] マルバツスタンプ(JOI 2019) [Java]

    [백준/ 16787번] マルバツスタンプ(JOI 2019) [Java]

    Problem JOI 君はマルスタンプ,バツスタンプ,マルバツスタンプの3種類のスタンプをそれぞれ 0 個以上持っている.これらはマルやバツのマークを紙に印字することができるスタンプである. マルスタンプを使うとマルが 1 つ印字され,バツスタンプを使うとバツが 1 つ印字される.マルバツスタンプを使うとマルとバツが横一列に 1 つずつ印字され,スタンプの向きを変えることで,マルの右にバツが来るようにも,バツの右にマルが来るようにも印字できる. JOI 君は,持っているスタンプをそれぞれちょうど 1 回ずつ適当な順番で使い,紙に横一列にマルとバツを印字した.印字されたマルとバツの列は文字列 S で表される.S は O と X から構成された長さ N の文字列であり,S_i = O ならば JOI 君が印字したマークのうち左から i 番目のものがマルであることを表し,S_i = X な..