task
stringlengths
0
154k
__index_level_0__
int64
0
39.2k
Problem C: Unhappy Class Problem 山之埡船孊園の1幎G組は、䞍幞を背負った女子生埒たちが集たるクラスである。 圌女たちは、幞犏になるこずを目暙に、日々様々な詊緎に立ち向かう。 圌女たちのクラスでは、幞犏になるための詊緎の䞀環ずしお、幞犏実技科目を受講するこずができる。 月曜から金曜のそれぞれ1限から N 限たでに授業科目の枠があり、 M 個の受講可胜な科目がある。 科目 i は、曜日 d i ( d i = 0, 1, 2, 3, 4がそれぞれ、月曜、火曜、氎曜、朚曜、金曜に察応する)の a i 限目から始たり、連続する k i コマで行われ、それを受講したずきに埗られる幞犏床は t i である。 各...
37,544
サヌゞェント・ラむアン 「ラむアン軍曹を救え」ずいう指什のもず、アむヅ軍の救出郚隊はドむツリヌの氎䞊郜垂で敵軍ず激しい戊闘を繰り広げおいたした。圌らは無事に軍曹ず合流したしたが、敵の戊車が倚く、救出ヘリを呌べずにいたした。そこで、圌らは敵の戊車を混乱させるため、郜垂にある橋を党お爆砎するずいう䜜戊を実行するこずにしたした。 䜜戊はすぐに叞什郚に䌝えられ、救出ヘリの準備が進められたした。救出ヘリを飛ばすためには、い぀橋が党お爆砎されるかを予枬しなければなりたせん。軍のプログラマであるあなたの任務は、救出郚隊が党おの橋の爆砎に必芁な時間を蚈算するこずです。 氎䞊郜垂は N 個の島で構成されおおり、島ず島ずの間には橋がかかっおいたす。すべ...
37,545
カツサンド (Cutlet Sandwich) ある䞖界には、 $X$ 皮類の「サンド」、 $Y$ 皮類の「カツ」、 $Z$ 皮類の「カレヌ」ずいう食べ物がありたす。 この䞖界には $N$ 皮類の「カツサンド」ずいう食べ物があり、 $i$ 皮類目のカツサンドは $A_i$ 皮類目のサンドず $B_i$ 皮類目のカツが原料です。 たた、 $M$ 皮類の「カツカレヌ」ずいう食べ物があり、 $i$ 皮類目のカツカレヌは $C_i$ 皮類目のカツず $D_i$ 皮類目のカレヌが原料です。 Segtree 君は、あるカツサンドたたはカツカレヌを持っおいるずき、原料のうち少なくずも $1$ ぀が共通しおいるようなカツサンドたたはカツカレヌず亀換...
37,546
Problem G : Everything Starts With Your Vote ヒュヌリスティクスずいう蚀葉がある。確実にうたくいくずいう保蚌はないけれども倧抵の堎合はうたくいく、比范的単玔なアプロヌチのこずだ。単玔にしお匷力であるがゆえに、この䞖の䞭は倚くのヒュヌリスティクスで満ち溢れおいる。 ヒュヌリスティクスの䞀䟋ずしお、こんなものが挙げられる。アニメ番組においお、あるキャラクタヌの人気床は、そのアニメ本線䞭における登堎時間の総和に比䟋する。確かにこれは倚くの堎合に成り立っおいるようだ。しかし、どうやら僕は少数掟に属するらしい。圱の薄いキャラ、背景にちらりず映るモブキャラなんかに限っお可愛く芋えたりするのだ。 自分の...
37,547
Score : 200 points Problem Statement Given N integers A_1, ..., A_N , compute A_1 \times ... \times A_N . However, if the result exceeds 10^{18} , print -1 instead. Constraints 2 \leq N \leq 10^5 0 \leq A_i \leq 10^{18} All values in input are integers. Input Input is given from Standard Input in the following format: ...
37,548
D: æ°Žæ§œ 問題 AORむカちゃんは瞊 $1$ 暪 $N$ の倧きさの氎槜をもらった。氎槜は氎を入れるのに十分な高さがある。 氎槜には $N-1$ 個の仕切りがあり $N$ 個の区画に等間隔に区切られおいる。 ここに氎を泚いだずころ、各区画の氎の高さは $a_i$ になった。 AORむカちゃんはいく぀か仕切りを取り陀き、区画の数を $M$ 個以䞋にするこずにした。 仕切りを取り陀き終わった時、各区画の氎の高さの総和の最倧倀を求めよ。 なお、仕切りの厚さは無芖できるものずする。 制玄 $1 \le N \le 500$ $1 \le M \le N$ $1 \le a_i \le 10^9$ 入力は党お敎数 入力 $N \ M$ $a...
37,549
Lake Survery The Onogawa Expedition is planning to conduct a survey of the Aizu nature reserve. The expedition planner wants to take the shortest possible route from the start to end point of the survey, while the expedition has to go around the coast of the Lake of Onogawa en route. The expedition walks along the coas...
37,550
C: 玠数 問題 ある日、玠数が倧奜きなそすうさ君は $p + q$ が玠数ずなるペア $(p, q)$ で遊んでいた。 そすうさ君は突然、このペアのうち、 $p$ ず $q$ がずもに $N$ 以䞋の玠数であるペアがいく぀あるか気になりだした。 そすうさ君に代わっお個数を求めよ。 制玄 入力倀は党お敎数である。 $1 \leq N \leq 10^7$ 入力圢匏 入力は以䞋の圢匏で䞎えられる。 $N$ 出力 ペアの個数を出力せよ。たた、末尟に改行も出力せよ。 サンプル サンプル入力 1 3 サンプル出力 1 2 ペアは $(2, 3), (3, 2)$ の二぀である。 サンプル入力 2 20 サンプル出力 2 8
37,551
Problem E: Earth Observation with a Mobile Robot Team A new type of mobile robot has been developed for environmental earth observation. It moves around on the ground, acquiring and recording various sorts of observational data using high precision sensors. Robots of this type have short range wireless communication de...
37,552
Shifting a Matrix You are given $N \times N$ matrix $A$ initialized with $A_{i,j} = (i - 1)N + j$, where $A_{i,j}$ is the entry of the $i$-th row and the $j$-th column of $A$. Note that $i$ and $j$ are 1-based. You are also given an operation sequence which consists of the four types of shift operations: left, right, u...
37,553
A Two Floors Dungeon It was the last day of the summer camp you strayed into the labyrinth on the way to Komaba Campus, the University of Tokyo. The contest has just begun. Your teammates must impatiently wait for you. So you have to escape from this labyrinth as soon as possible. The labyrinth is represented by a grid...
37,554
Problem A: Keitai Message Alice さんは Miku さんに携垯電話でメヌルを送ろうずしおいる。 携垯電話には入力に䜿えるボタンは数字のボタンしかない。 そこで、文字の入力をするために数字ボタンを䜕床か抌しお文字の入力を行う。携垯電話の数字ボタンには、次の文字が割り圓おられおおり、ボタン 0 は確定ボタンが割り圓おられおいる。この携垯電話では 1 文字の入力が終わったら必ず確定ボタンを抌すこずになっおいる。 1: . , ! ? (スペヌス) 2: a b c 3: d e f 4: g h i 5: j k l 6: m n o 7: p q r s 8: t u v 9: w x y z 0: 確定ボ...
37,555
Score: 600 points Problem Statement AtCoder's head office consists of N rooms numbered 1 to N . For any two rooms, there is a direct passage connecting these rooms. For security reasons, Takahashi the president asked you to set a level for every passage, which is a positive integer and must satisfy the following condit...
37,556
Score : 2000 points Problem Statement You are participating in a quiz with N + M questions and Yes/No answers. It's known in advance that there are N questions with answer Yes and M questions with answer No, but the questions are given to you in random order. You have no idea about correct answers to any of the questio...
37,557
Score : 900 points Problem Statement Takahashi has a lot of peculiar devices. These cylindrical devices receive balls from left and right. Each device is in one of the two states A and B, and for each state, the device operates as follows: When a device in state A receives a ball from either side (left or right), the d...
37,558
Score : 100 points Problem Statement There is an N -car train. You are given an integer i . Find the value of j such that the following statement is true: "the i -th car from the front of the train is the j -th car from the back." Constraints 1 \leq N \leq 100 1 \leq i \leq N Input Input is given from Standard Input in...
37,559
D: 矢 / Arrow 問題 rodea 君は 1 次元座暙系の䞭におり、 x = 0 の堎所に立っおいる。この䜍眮から、 x = N の䜍眮にある的を目がけお、 垞に速さ 1 で移動する正の敎数の長さの矢を投げる。しかし、rodea 君は非力なため、 区間 0 \leq x \leq N の䞭に合蚈 M 個の送颚機を眮くこずにしおいる。 ここで、矢の先端から根元たでの䜍眮に 1 ぀の送颚機も含たれない堎合を「損倱」ず定矩する。損倱の刀定は、矢の先端が x = 1, 2, 3, $\ldots$ , N に到達した際に行う぀たり、合蚈 N 回行う。 このずき、以䞋のク゚リを Q 回凊理せよ。 「損倱」蚱容可胜な回数 l_i が...
37,560
走れ双子 (Run, Twins) E869120君は、家から孊校ぞ向かっお分速 $P$ メヌトルで走り出したした。 square1001君は、E869120君が家を出発しおから $A$ 分埌にE869120君の忘れ物に気が付き、分速 $Q$ メヌトルで远いかけたした。 その埌、E869120君は、E869120君が家を出発しおから $B$ 分埌に忘れものに気が付き、分速 $R$ メヌトルで道を匕き返したした。 E869120君が家を出発しおから䜕分埌に双子は出䌚うでしょうか ただし、$B$ 分埌たでにE869120君ずsquare1001君が出䌚うこずはありたせん。 たた、E869120君ずsquare1001君の家から孊校たで...
37,561
Set Union Find the union of two sets $A = \{a_0, a_1, ..., a_{n-1}\}$ and $B = \{b_0, b_1, ..., b_{m-1}\}$. Input The input is given in the following format. $n$ $a_0 \; a_1 \; ... \; a_{n-1}$ $m$ $b_0 \; b_1 \; ... \; b_{m-1}$ Elements of $A$ and $B$ are given in ascending order respectively. There are no duplicate el...
37,562
B: Shortest Crypt 問題 xryuseixくんの孊校では暗号が流行しおいる. 栌子状の街に䜏んでいるxryuseixくんは集合堎所を決める新しい暗号を考えた. 暗号文は $N$ 文字の文字列 $S$ からなり, $S_i$ の文字によっお珟圚地からの移動方向を決める. 移動方向に関しおは以䞋の通りである. A ~ M : 北にマス進む. N ~ Z : 南にマス進む. a ~ m : 東にマス進む. n ~ z : 西にマス進む. さお,ここでxryuseixくんは, yryuseiyちゃんにデヌトの集合堎所を暗号文で教えようず思ったのだが, 暗号文が冗長なこずに気づいた. 䟋えば,「ANA」ずいう暗号文があ...
37,563
Score : 800 points Problem Statement Given is a positive even number N . Find the number of strings s of length N consisting of A , B , and C that satisfy the following condition: s can be converted to the empty string by repeating the following operation: Choose two consecutive characters in s and erase them. However,...
37,564
Problem D: Sum of Different Primes A positive integer may be expressed as a sum of different prime numbers (primes), in one way or another. Given two positive integers n and k , you should count the number of ways to express n as a sum of k different primes. Here, two ways are considered to be the same if they sum up t...
37,565
Score : 300 points Problem Statement There are 3N participants in AtCoder Group Contest . The strength of the i -th participant is represented by an integer a_i . They will form N teams, each consisting of three participants. No participant may belong to multiple teams. The strength of a team is defined as the second l...
37,566
Score : 100 points Problem Statement You are given two integers A and B . Find the largest value among A+B , A-B and A \times B . Constraints -1000 \leq A,B \leq 1000 All values in input are integers. Input Input is given from Standard Input in the following format: A B Output Print the largest value among A+B , A-B an...
37,567
Problem 06: Ghost Buster! 䞀般人には知る由も無いこずだが、この街は幜霊で溢れおいる。そのほずんどは無害なのだが、困ったこずに、人を呪う悪霊も少なからずいるのだ。 あるずころに、そんな悪霊ず戊う少女がいた。圌女は昌間は䜕食わぬ顔で高校に通いながらも、倜になるず街䞭を歩き回り、圷埚える魂を芋付けおは成仏させるのだ。 幜霊を成仏させるためにはたずその幜霊に接近する必芁があるのだが、それは簡単なこずではない。幜霊は物をすり抜けられるからだ。幜霊は民家に壁から䟵入しお勝手口から出お行ったり、信号の無い倧通りを悠々ず暪断したりする。人間である圌女にはそんなこずはできないので、幜霊を远跡するのはずおも難しいのだ。 圌女は...
37,568
Eバむナリ列 - Binary Sequence - 物語 わしはバむナリ倧奜きBonald.Brvin.Bnuthじゃ オフトゥンフォヌド倧孊でバむナリ列の性質を研究しおおっおのお、Bnuthおじさんず呌ばれお、芪したれおおるぞい ちなみに、わしの名前「Bonald.Brvin.Bnuth」をASCIIコヌドからバむナリ化するず「1000010 1101111 1101110 1100001 1101100 1100100 101110 1000010 1110010 1110110 1101001 1101110 101110 1000010 1101110 1110101 1110100 1101000」になるぞい 楜...
37,569
ブロックの䞉角圢 図a のように積たれたブロックに察し、以䞋の䞊べ替え操䜜を繰り返す。 䞀番䞋のブロック党お図a 䞭の癜のブロックを右端に新しく積み䞊げる残りのブロックは自動的に段䞋に萜ち、図b のようになる。 ブロックの間に隙間ができたら、巊に詰めお隙間をなくす図 b から図c のようになる。 1 以䞊の敎数 k に察しお、k×(k1)/2 で衚される数 (䟋:1, 3, 6, 10, ...)を䞉角数ずいう。ブロックの総数が䞉角数の堎合、䞊蚘の䞊べ替えを繰り返すず、巊端の高さが1 で右に向かっお぀ず぀高くなっおいくような䞉角圢になるず予想されおいる図d は総数が15 個の堎合。 ブロックの最初の䞊びが䞎えら...
37,570
Problem C: Push!! Mr. Schwarz was a famous powerful pro wrestler. He starts a part time job as a warehouseman. His task is to move a cargo to a goal by repeatedly pushing the cargo in the warehouse, of course, without breaking the walls and the pillars of the warehouse. There may be some pillars in the warehouse. Excep...
37,571
Problem H: Caterpillar ずある倩空郜垂に䜏む倧孊生のGは、芋虫のいも倪郎を飌っおいる。 圌は、いも倪郎に最短歩数で党おのえさを順番に食べるように躟けをした。圌の友人であるあなたは、圌からいも倪郎が本圓に躟けられおいるかどうかを調べお欲しいず䟝頌されたので、プログラムを曞くこずにした。 Problem 耇数の障害物ず゚サがグリッド状の゚リア内に存圚する。頭ず 5 ぀の胎䜓を持぀芋虫がこの゚リアを探玢する。芋虫が順番に最埌たで゚サを食べたずきの最小の歩数を求めよ。 ただし党おの゚サを食べるこずが䞍可胜な堎合は -1 を出力するこず。なお、゚サの䞊に芋虫の頭が重なったずき、゚サを食べるこずができる。 ゚リアは以䞋の文...
37,572
問題文 文字列 $S$ が䞎えられる。$S$ のすべおのアナグラムのうち、回文になっおいるものの個数を求めよ。 文字列 $X$ が $Y$ のアナグラムであるずは、$X$ が $Y$ ず等しいか、$X$ の文字を䞊び替えたら $Y$ に等しくなるこずをいう。䟋えば文字列abcdに察しお、abcdやcbdaなどはアナグラムであるが、abedやcabやabcddなどはアナグラムでない。 文字列 $X$ が回文であるずは、$X$ を逆から読んだものが $X$ 自身ず等しくなるこずをいう。䟋えばabcやabは回文でなく、aやabccbaなどは回文である。 入力 入力は以䞋の圢匏に埓う。 $S$ 制玄 $1 \leq |S| \leq 40$...
37,573
Problem I: Roads in a City Roads in a city play important roles in development of the city. Once a road is built, people start their living around the road. A broader road has a bigger capacity, that is, people can live on a wider area around the road. Interstellar Conglomerate of Plantation and Colonization (ICPC) is ...
37,574
Problem D: So Sleepy You have an appointment to meet a friend of yours today, but you are so sleepy because you didn’t sleep well last night. As you will go by trains to the station for the rendezvous, you can have a sleep on a train. You can start to sleep as soon as you get on a train and keep asleep just until you g...
37,575
Transparent Mahjong F: 透明な麻雀牌 あなたは闇に舞い降りた倩灜ず噂されるギャンブラヌの鷹巣さんず麻雀で察局するこずになった 鷹巣さんは倩灜ず噂されるだけあっお鷹巣牌ずいう奇怪な麻雀牌を甚いた察局を提案しおきた 麻雀ずはプレむダヌが互いに手牌ずいう耇数枚の牌を持ち合い自分の手牌を盞手よりもはやくアガリの圢にするこずで勝利が確定するゲヌムである 麻雀の牌の衚偎にはその牌が䜕であるかが描かれおおり牌の裏偎には䜕も描かれおいない よっおあなたが麻雀で察局するずきはあなたの手牌の衚偎をあなたの偎に裏偎を察局者の偎に向けるずよい こうするこずであなたの手牌が䜕であるかはあなたのみが知る...
37,576
Bridge Removal ICPC islands once had been a popular tourist destination. For nature preservation, however, the government decided to prohibit entrance to the islands, and to remove all the man-made structures there. The hardest part of the project is to remove all the bridges connecting the islands. There are n islands...
37,577
Score : 900 points Problem Statement There are N pinholes on the xy -plane. The i -th pinhole is located at (x_i,y_i) . We will denote the Manhattan distance between the i -th and j -th pinholes as d(i,j)(=|x_i-x_j|+|y_i-y_j|) . You have a peculiar pair of compasses, called Manhattan Compass . This instrument always po...
37,578
A: ç§€ / Steelyard 問題文 情倪くんは長さ $2L$ の棒を䜿っお䞋の図のような秀を䜜った 棒には等間隔に $2L+1$ 個の穎があけられ巊から順に $-L, -L+1, \cdots, -1, 0, 1, \cdots, L-1, L$ ずいう番号が付けられおいるそしお $0$ 番の穎の堎所を倩井から玐で吊るしおある 情倪くんは秀の穎に $N$ 個のおもりを吊るした$i$ 番目のおもりを吊るした穎の番号は $x_i$ でおもりの重さは $w_i$ であるおもりが $1$ ぀も吊るされない穎や耇数のおもりが吊るされる穎も存圚しうる 情倪くんが吊るしたおもりによっおは秀が傟いおいるかもしれない姉の...
37,579
消える数列、消えない数列 ただお君は頭の䜓操をするために、数列を䜿ったゲヌムをしおいたす。このゲヌムでは、はじめに、からたでの数字がランダムに䞊んだ列が䞎えられたす。ただお君は、数列からその䞀郚分を消しおいきたす。ルヌルは、以䞋の通りです。 数列から、同じ数字が぀以䞊䞊んでいる郚分を適圓に遞ぶ。その郚分を含み、連続しお珟れおいる同じ数字をすべお消す。 消した郚分の右偎に数列が残っおいた堎合は、それを巊に詰めお、数列を぀にたずめる。 䞊の぀の操䜜を繰り返した結果、すべおの数字が消えればゲヌムクリアずなる。 䟋えば、䞊の図のような 1,2,3,3,2,2,1,2,2 ずいう数列の堎合、 巊から数えお、番目、番目のを消すず...
37,580
おせんべい 問題 IOI補菓では創業以来の䌝統の補法で煎逅せんべいを焌いおいるこの䌝統の補法は炭火で䞀定時間衚偎を焌き衚偎が焌けるず裏返しお炭火で䞀定時間裏偎を焌くずいうものであるこの䌝統を守り぀぀煎逅を機械で焌いおいるこの機械は瞊 R (1 ≀ R ≀ 10) 行, 暪 C (1 ≀ C ≀ 10000) 列の長方圢状に煎逅を䞊べお焌く通垞は自動運転で衚偎が焌けたら䞀斉に煎逅を裏返し裏偎を焌く ある日煎逅を焌いおいるず煎逅を裏返す盎前に地震が起こり䜕枚かの煎逅が裏返っおしたった幞いなこずに炭火の状態は適切なたたであったがこれ以䞊衚偎を焌くず創業以来の䌝統で定められおいる焌き時間を超えおしたい煎逅...
37,581
Division of Big Integers Given two integers $A$ and $B$, compute the quotient, $\frac{A}{B}$. Round down to the nearest decimal. Input Two integers $A$ and $B$ separated by a space character are given in a line. Output Print the quotient in a line. Constraints $-1 \times 10^{1000} \leq A, B \leq 10^{1000}$ $B \ne 0$ Sa...
37,582
Sorting Five Numbers Write a program which reads five numbers and sorts them in descending order. Input Input consists of five numbers a , b , c , d and e (-100000 ≀ a , b , c , d , e ≀ 100000). The five numbers are separeted by a space. Output Print the ordered numbers in a line. Adjacent numbers should be separated b...
37,583
K: 救枈 (Angel Relief) 倩䜿の倩真さんは、ある街を救うこずにした。 この街は南北 $H$ 区画 × 東西 $W$ 区画に分けられた長方圢の圢をしおおり、各区画に家がある。 北から数えお $X$ 番目、西から数えお $Y$ 番目の区画を $(X, Y)$ で衚す。 区画 $(i, j)$ にある家には $A_{i, j}$ 人の人が䜏んでいる。 倩真さんは、蟺が南北たたは東西に平行たたは垂盎な長方圢の゚リアを遞び、その䞭に䜏んでいる人党員を ひずりず぀ 救枈する。 倩真さんは、考えられるすべおの長方圢でこの操䜜を行う。 倩真さんが人を救枈する回数の合蚈を求めよ。 入力 1 行目に、敎数 $H, W$ が空癜区切りで䞎...
37,584
Score : 100 points Problem Statement Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter. Constraints 2\leq K\leq 100 K is an integer. Input Input is given from Standard Input in the following format: K Output Pri...
37,585
Problem J: Tile Puzzle You are visiting Ancient and Contemporary Museum. Today there is held an exhibition on the history of natural science. You have seen many interesting exhibits about ancient, medieval, and modern science and mathematics, and you are in a resting space now. You have found a number of panels there. ...
37,586
Score : 400 points Problem Statement You are given a tree with N vertices. Here, a tree is a kind of graph, and more specifically, a connected undirected graph with N-1 edges, where N is the number of its vertices. The i -th edge (1≀i≀N-1) connects Vertices a_i and b_i , and has a length of c_i . You are also given Q q...
37,587
One Problem Statement 電車の窓から矎しい山䞊みが芋える 窓は巊䞋隅の座暙が (0, 0) 右䞊隅の座暙が (W, H) の長方圢である 窓からは N ぀の山が芋えおおり i 番目の山は䞊に凞な攟物線 y = a_i (x-p_i)^2 + q_i の圢をしおいる 山ず空ずの境界線の長さを求めよ 次の䞉぀の図は Sample Input に察応しおいる倪線で瀺されおいる郚分が山ず空ずの境界線である Input 入力は以䞋の圢匏に埓う䞎えられる数は党お敎数である W H N a_1 p_1 q_1 ... a_N p_N q_N Constraints 1 ≩ W, H ≩ 100 1 ≩ N...
37,588
Score: 600 points Problem Statement E869120 is initially standing at the origin (0, 0) in a two-dimensional plane. He has N engines, which can be used as follows: When E869120 uses the i -th engine, his X - and Y -coordinate change by x_i and y_i , respectively. In other words, if E869120 uses the i -th engine from coo...
37,589
Score : 700 points Problem Statement In the State of Takahashi in AtCoderian Federation, there are N cities, numbered 1, 2, ..., N . M bidirectional roads connect these cities. The i -th road connects City A_i and City B_i . Every road connects two distinct cities. Also, for any two cities, there is at most one road th...
37,590
Score : 1000 points Problem Statement There are N oases on a number line. The coordinate of the i -th oases from the left is x_i . Camel hopes to visit all these oases. Initially, the volume of the hump on his back is V . When the volume of the hump is v , water of volume at most v can be stored. Water is only supplied...
37,591
Score : 500 points Problem Statement Takahashi is at an all-you-can-eat restaurant. The restaurant offers N kinds of dishes. It takes A_i minutes to eat the i -th dish, whose deliciousness is B_i . The restaurant has the following rules: You can only order one dish at a time. The dish ordered will be immediately served...
37,592
Problem L: Product Problem 䌚接君は、玠数$P$、自然数からなる集合$G$、自然数$A$を䜿っおゲヌムをするこずにしたした。 たず、䌚接君は手元の玙に$1$を曞きたす。その埌、以䞋の䞀連の操䜜を任意の回数行いたす。 $G$から芁玠を䞀぀遞ぶ。これを$g$ずする。 手元の玙に曞かれた数ず$g$ずの積を新しく玙に曞く。 元々玙に曞かれおいた数を消す。 手元の玙に曞かれた数を$P$で割ったあたりず$A$が等しければ䌚接君の勝ちで、そうでなければ負けです。$P$、$G$、$A$が䞎えられたずきに䌚接君が勝぀こずができるか刀定しおください。 Input 入力は以䞋の圢匏で䞎えられる。 $P$ $T$ $Test_1$...
37,593
Testing Circuits A Boolean expression is given. In the expression, each variable appears exactly once. Calculate the number of variable assignments that make the expression evaluate to true. Input A data set consists of only one line. The Boolean expression is given by a string which consists of digits, x, (, ), |, &, ...
37,594
Problem I: Hard Beans Problem 倧接倧孊では豆が盛んです。 N 個の豆が䞀盎線䞊に䞊んでいたす。 それぞれ0から順に N −1たで番号がふられおおり、 i 番目の豆の硬さを a i ずしたす。 シアン君は理想の豆の硬さを D だず考えおいたす。しかし、シアン君は面倒くさがりなのであたり遠くにある豆を取りに行きたくありたせん。したがっお、シアン君は l 番目の豆から r 番目の豆の䞭で硬さが D に最も近い豆を知りたいず思っおいたす。 シアン君は Q 個の質問をしおくるので、それぞれの質問に察し閉区間[ l , r ]番目にある | 豆の硬さ − D | の最小倀を求めるプログラムを䜜成しおください。(ただ...
37,596
Score : 600 points Problem Statement The squirrel Chokudai has N acorns. One day, he decides to do some trades in multiple precious metal exchanges to make more acorns. His plan is as follows: Get out of the nest with N acorns in his hands. Go to Exchange A and do some trades. Go to Exchange B and do some trades. Go to...
37,597
Pattern Search Find places where a R × C pattern is found within a H × W region. Print top-left coordinates ( i , j ) of sub-regions where the pattern found. The top-left and bottom-right coordinates of the region is (0, 0) and ( H -1, W -1) respectively. Input In the first line, two integers H and W are given. In the ...
37,598
おそろいの景品 ゞョり君ずダ゚さんは仲の良いカップルです。ゞョり君はカプセル玩具自販機(ガチャポン)の景品を集めおおり、二人で出かけたずきも、ガチャポンを芋぀けるず䜕床かやっおみるほどの熱の入りようです。ダ゚さんは楜しそうなゞョり君をそばで芋おいるだけでしたが、ゞョり君の今床の誕生日プレれントにガチャポンの景品をひず぀あげるこずにしたした。ダ゚さんはガチャポン自䜓にはあたり興味がわきたせんでしたが、できればゞョり君ずおそろいの景品が欲しいず思っおいたす。 ダ゚さんがやっおみようず思うガチャポンは、回のチャレンゞで景品がひず぀出たす。品切れのものも含め景品が䜕皮類あるのかず、それぞれの景品がいく぀残っおいるのかはわかりたす。しかし、...
37,599
F: Steps 問題 AORむカちゃんは株匏䌚瀟AORの芖察に蚪れた。 株匏䌚瀟AORは $N$ 階建おのビルであり、地䞋階は存圚しない。 AORむカちゃんは $1$ 階から芖察を開始し、ちょうど $M$ 回移動するこずにした。 $1$ 回の移動で $i$ 階から $i + 1$ 階、あるいは $i - 1$ 階に移動するこずができる。 ただし、 移動先が $0$ 階や $N + 1$ 階ずなるように移動するこずはできない。 AORむカちゃんが党おの階に䞀床以䞊蚪れる移動方法の通り数を $1000000007 (= 10^9 + 7)$ で割った䜙りを求めよ。 なお、 $1$ 階にはすでに蚪れたものずする。 制玄 $2 \leq ...
37,600
(Please read problem A first. The maximum score you can get by solving this problem B is 1, which will have almost no effect on your ranking.) Beginner's Guide Let's first write a program to calculate the score from a pair of input and output. You can know the total score by submitting your solution, or an official pro...
37,601
Problem D: Dr. Nakamura's Lab. Dr.䞭村は偉倧な発明者である, 今日も垞人には発想出来ない新たな発明に取り掛かっおいる. 今発明しおいるのは新たな防犯システムずコンテナである. 防犯システムの方は䞊に乗った者を識別しお招かれざる客だった堎合, 電流を流しお気絶させるパネルである. このパネルは螏たないように䞊を通過しおも無駄で, 空䞭のものに察し攟電する. しかし, ただ完成には皋遠く, 電流は匷すぎお調節が䞍可胜で, 䞀床攟電するず充電しない限り䜿えない. たた, 人ず物䜓の区別ができず, そもそも人自䜓区別できない等欠点をあげればキリがない. コンテナの方は謎の力によっお垞時地面から浮いおおり, ...
37,602
日の出ず日の入り 倪陜が珟れるこずを「日の出」、隠れるこずを「日の入り」ず呌びたすが、その厳密な時刻は倪陜が地平線に察しおどのような䜍眮にある時でしょうか。 䞋の図のように、倪陜を円、地平線を盎線で衚すこずにしたす。このずき、倪陜の「日の出」「日の入り」の時刻は、倪陜を衚す円の䞊端が地平線を衚す盎線ず䞀臎する瞬間ずされおいたす。日の出の時刻を過ぎ、円の䞊端が盎線より䞊にある時間垯が昌間、円が盎線の䞋ぞ完党に隠れおいる時間垯が倜間ずなりたす。 ある時刻の地平線から倪陜の䞭心たでの高さず、倪陜の半埄を入力ずし、その時刻が「昌間」か、「日の出たたは日の入り」か、「倜間」かを出力するプログラムを䜜成せよ。 Input 入力は以䞋の圢匏で䞎え...
37,603
B: 呚期数列 - Periodic Sequence - 問題 H倧孊の教授を務めおいるPeriod博士は、䞇物に朜むずされる呚期ず呌ばれる性質を研究しおいる。䞀般的に知られおいる基本的な呚期ずしおは、数列に朜む呚期が考えられるだろう。すなわち、長さ N の数列 S = S_1, S_2, ... , S_N が以䞋の性質を満たすならば、呚期 t ( t \≀ N ) を持぀ずいう事実である。 1 \≀ i \≀ N − t に぀いお、 S_i=S_{i+t} である。 今、Period博士が着目しおいるのは、呚期を甚いおより簡易な蚘述ができる数列である。䟋えば、長さ N の数列が呚期 t ( \≀ N ) を持぀ずき、ある敎数 ...
37,604
Recurring Decimals A decimal representation of an integer can be transformed to another integer by rearranging the order of digits. Let us make a sequence using this fact. A non-negative integer a 0 and the number of digits L are given first. Applying the following rules, we obtain a i +1 from a i . Express the integer...
37,605
A - アルデンテ 問題文 わたしは近所のスヌパヌで初めおスパゲッティずいうものを賌入したパッケヌゞの情報によるずこのスパゲッティは T 秒茹でるず最も理想的な状態に茹で䞊がるらしい ずころでわたしは電気が嫌いな人間であり家にはテレビやパ゜コンはおろか時蚈さえ無い そのためスパゲッティを茹でようにも時間を枬るこずができない 電池匏の時蚈は嫌なのでわたしは代わりに砂時蚈を買おうず考えスヌパヌの砂時蚈売り堎ぞず向かった 売り堎には N 個の砂時蚈があった i 番目の砂時蚈はちょうど x i 秒だけ枬るこずができるようであった いろいろあっお悩たしいがスパゲッティのために砂時蚈を䜕個も買うのは銬鹿らしいのでこの...
37,606
Problem H: Robot's Crash Prof. Jenifer A. Gibson is carrying out experiments with many robots. Since those robots are expensive, she wants to avoid their crashes during her experiments at her all effort. So she asked you, her assistant, as follows. “Suppose that we have n (2 ≀ n ≀ 100000) robots of the circular shape w...
37,607
Score : 100 points Problem Statement You planned a trip using trains and buses. The train fare will be A yen (the currency of Japan) if you buy ordinary tickets along the way, and B yen if you buy an unlimited ticket. Similarly, the bus fare will be C yen if you buy ordinary tickets along the way, and D yen if you buy ...
37,608
Score : 800 points Problem Statement This is an interactive task. Snuke has a favorite positive integer, N . You can ask him the following type of question at most 64 times: "Is n your favorite integer?" Identify N . Snuke is twisted, and when asked "Is n your favorite integer?", he answers "Yes" if one of the two cond...
37,609
Score : 300 points Problem Statement You are given a sequence of length N : A_1, A_2, ..., A_N . For each integer i between 1 and N (inclusive), answer the following question: Find the maximum value among the N-1 elements other than A_i in the sequence. Constraints 2 \leq N \leq 200000 1 \leq A_i \leq 200000 All values...
37,610
Score : 700 points Problem Statement We have a directed weighted graph with N vertices. Each vertex has two integers written on it, and the integers written on Vertex i are A_i and B_i . In this graph, there is an edge from Vertex x to Vertex y for all pairs 1 \leq x,y \leq N , and its weight is {\rm min}(A_x,B_y) . We...
37,611
Score : 300 points Problem Statement You are given N real values A_1, A_2, \ldots, A_N . Compute the number of pairs of indices (i, j) such that i < j and the product A_i \cdot A_j is integer. Constraints 2 \leq N \leq 200\,000 0 < A_i < 10^4 A_i is given with at most 9 digits after the decimal. Input Input is given fr...
37,612
Problem Statement In A.D. 2101, war was beginning. The enemy has taken over all of our bases. To recapture the bases, we decided to set up a headquarters. We need to define the location of the headquarters so that all bases are not so far away from the headquarters. Therefore, we decided to choose the location to minim...
37,613
Transformation Write a program which performs a sequence of commands to a given string $str$. The command is one of: print a b : print from the a -th character to the b -th character of $str$ reverse a b : reverse from the a -th character to the b -th character of $str$ replace a b p : replace from the a -th character ...
37,614
Problem A: Special Chat Problem 人気動画投皿サむト「ZouTube」は今、空前の「バヌチャルZouTuber」ブヌムの真っ只䞭にある。その䞭でも、最近特に泚目を集めおいるのは、埌茩系バヌチャルZouTuber「アむヅマリム通称アヅリム」だ。 アヅリムの倧ファンであるあなたは、本日のアヅリムのラむブ配信で、圌女に「スペシャルチャット」を送る぀もりだ。 「スペシャルチャット」ずは、ZouTubeの提䟛する「芖聎者が配信者にポむントをプレれントする機胜」 だ。芖聎者はスペシャルチャット$1$回に぀き、$500$, $1000$, $5000$, $10000$のいずれかだけポむントを消費しお、消費した...
37,615
Score : 100 points Problem Statement You are given an array a_0, a_1, ..., a_{N-1} of length N . Process Q queries of the following types. The type of i -th query is represented by T_i . T_i=1 : You are given two integers X_i,V_i . Replace the value of A_{X_i} with V_i . T_i=2 : You are given two integers L_i,R_i . Cal...
37,616
Score : 900 points Problem Statement There is a tree with N vertices numbered 1 through N . The i -th of the N-1 edges connects vertices a_i and b_i . Initially, each vertex is uncolored. Takahashi and Aoki is playing a game by painting the vertices. In this game, they alternately perform the following operation, start...
37,617
Problem G: Nim Let's play a traditional game Nim. You and I are seated across a table and we have a hundred stones on the table (we know the number of stones exactly). We play in turn and at each turn, you or I can remove one to four stones from the heap. You play first and the one who removed the last stone loses. In ...
37,618
Score : 600 points Problem Statement We have a tree with N vertices. The i -th edge connects Vertex A_i and B_i bidirectionally. Takahashi is standing at Vertex u , and Aoki is standing at Vertex v . Now, they will play a game of tag as follows: 1 . If Takahashi and Aoki are standing at the same vertex, the game ends. ...
37,619
Score : 900 points Problem Statement Akaki, a patissier, can make N kinds of doughnut using only a certain powder called "Okashi no Moto" (literally "material of pastry", simply called Moto below) as ingredient. These doughnuts are called Doughnut 1 , Doughnut 2 , ..., Doughnut N . In order to make one Doughnut i (1 ≀ ...
37,620
RPG Maker You are planning to create a map of an RPG. This map is represented by a grid whose size is $H \times W$. Each cell in this grid is either ' @ ', ' * ', ' # ', or ' . '. The meanings of the symbols are as follows. ' @ ': The start cell. The story should start from this cell. ' * ': A city cell. The story goes...
37,621
Problem E: School Excursion 春、それは修孊旅行の時期である。 䌚接倧孊附属小孊校䌚接倧小でも、来幎床の修孊旅行の蚈画が建おられおいた。 修孊旅行は電車で移動するこずが䌝統になっおいる。 䌚接若束垂内では電車を利甚する機䌚が少ないためだ。 しかし、孊校に届いたある苊情により教員たちは頭を悩たせおいた。 それは、「ある駅で倧人数で乗り換えを行っおいたので、その駅を利甚する他の乗客に迷惑であった」ずいう内容だった。 ずくに、電車を降りたあずホヌムからの通路で倧混雑しおしたったずいう。 それは近幎、䌚接倧小の生埒数が急䞊昇しおいるからであった。 その原因は日本においお競技プログラミングが倧流行し、 小孊校から...
37,622
Pilling Blocks We make a tower by stacking up blocks. The tower consists of several stages and each stage is constructed by connecting blocks horizontally. Each block is of the same weight and is tough enough to withstand the weight equivalent to up to $K$ blocks without crushing. We have to build the tower abiding by ...
37,623
迷子の双子 たかゆき君ずかずゆき君は仲良しの双子ですが、行動が真逆です。 䟋えば、たかゆき君が西に行けば、かずゆき君は東ぞ行き、かずゆき君が北ぞ行けば、たかゆき君は南ぞ行きたす。 珟圚 2 人はデパヌトに来おおり、別々の堎所にいたす。真逆に移動しおしたう 2 人ができるだけ早く出䌚うためにはどうしたらよいでしょうか? デパヌトは暪 W 個 × 瞊 H 個のマスで構成されるグリッドで衚され、2 人は単䜍時間に東西南北に 1 マス分移動するこずができたす。ただし、グリッドの範囲倖や障害物のあるマスに移動するこずはできたせん。 図のように、グリッドのマスの䜍眮は座暙 ( x , y ) で衚されたす。 グリッドの情報ず 2 人の初期䜍眮を...
37,624
Courage Test P「今日は肝詊し䌁画の番組の収録だ。」 O型智絵里「き、きもだめし  」 四村かな子「智絵里ちゃん倧䞈倫」 月野茜「さすがPさん䞀行で状況が明晰刀明にわかる玠晎らしい解説ですさあ火の玉に向かっお走りたしょう」 P「ルヌルは簡単、みんなで協力しおこの゚リアのすべおの神瀟にお参りしおくるだけだ。」 茜「オヌ゜ドックスですね早速神瀟に向かっお走りたしょう」 かな子「でもここ、日本有数の神瀟密床で行かなくちゃいけない神瀟がたくさんあるんじゃなかったっけ  」 かな子「でも茜ちゃんがいれば心匷いよ」 P「ちなみにスタヌトは党員違う神瀟からスタヌト、合流も犁止だ。それじゃあ智絵里ずかな子は初期䜍眮に぀い...
37,625
Problem H: Testing Sorting Networks A N sorting network is a circuit that accepts N numbers as its input, outputs them sorted. Mr. Smith is an engineer of a company that sells various sizes of the circuit. One day, the company got an order of N sorting networks. Unfortunately, they didn't have the circuit for N numbers...
37,626
問題文 圱の魔女 ELSAMARIA はすべおのものに察しお祈りを続ける魔女である圱に捕たったあらゆる呜はこの魔女の䞭に匕きずり蟌たれおしたう 圱は觊手のように動き 矎暹さやか を匕きずり蟌もうず狙っおいる 矎暹さやか はこの魔女に捕たるこずなく攻撃するために魔女にずっお予枬の難しいでたらめな動きをするこずを考えた具䜓的にはたず頭の䞭で 1 から N たでの敎数を䞀様な確率で K 個䜜りその合蚈倀の距離だけ今の䜍眮から魔女の方向ぞゞャンプするずいうこずを繰り返すのであるそしお魔女の䜍眮に到達した時に攻撃するのである さやか ず魔女はある䞀盎線䞊にいるずし最初魔女は座暙 0  さやか は座暙 S の䜍眮にいるも...
37,627
X-Ray Screening System これは 20XX 幎の話である再生発電網による安定した゚ネルギヌ䟛絊および液化合成燃料の発明によっお航空旅客数は鰻登りに増加したしかし航空機によるテロリズムの脅嚁は䟝然ずしお存圚するため高速でか぀高い信頌性をも぀自動手荷物怜査システムの重芁性が高たっおいる怜査官が党郚の荷物を調べるこずは実際問題ずしお困難であるこずから自動怜査においお疑わしいず刀断された手荷物だけを怜査官で改めお調べるずいう仕組みを敎えたいわけである 航空機業界からの芁請を受け囜際客宀保護䌚瀟International Cabin Protection Companyでは新たな自動怜査システムを開...
37,628
Problem H: Magic Walls You are a magician and have a large farm to grow magical fruits. One day, you saw a horde of monsters, approaching your farm. They would ruin your magical farm once they reached your farm. Unfortunately, you are not strong enough to fight against those monsters. To protect your farm against them,...
37,629
Problem G: Surface Area of Cubes Taro likes a single player game "Surface Area of Cubes". In this game, he initially has an $A \times B \times C$ rectangular solid formed by $A \times B \times C$ unit cubes (which are all 1 by 1 by 1 cubes). The center of each unit cube is placed at 3-dimentional coordinates $(x, y, z)...
37,630
Score : 700 points Problem Statement Snuke has decided to play a game, where the player runs a railway company. There are M+1 stations on Snuke Line, numbered 0 through M . A train on Snuke Line stops at station 0 and every d -th station thereafter, where d is a predetermined constant for each train. For example, if d ...
37,631
Problem C: How can I satisfy thee? Let me count the ways... Three-valued logic is a logic system that has, in addition to "true" and "false", "unknown" as a valid value. In the following, logical values "false", "unknown" and "true" are represented by 0, 1 and 2 respectively. Let "-" be a unary operator (i.e. a symbol ...
37,632
Electric Metronome A boy PCK is playing with N electric metronomes. The i -th metronome is set to tick every t_i seconds. He started all of them simultaneously. He noticed that, even though each metronome has its own ticking interval, all of them tick simultaneously from time to time in certain intervals. To explore th...
37,633
サむコロパズル 各面にアルファベット䞀文字(a 〜 z、A 〜 Z)が描かれたサむコロがありたす。 このようなサむコロを8぀組み合わせお 2 × 2 × 2 の立方䜓を䜜るこずを考えたす。 組み合わせ方には条件があり、各サむコロの向き合う面は同じアルファベットでか぀䞀方が小文字、も う䞀方が倧文字でなければなりたせん。䟋えば、a ず描かれた面に接するこずができるのは A ず描か れた面です。ただし、接するずきの文字の向きは問いたせん。 このルヌルに埓い、぀のサむコロの情報を入力ずし、立方䜓を䜜れるか吊かを刀定するプログラムを䜜成しおください。立方䜓を䜜れる堎合は YES半角英倧文字、䜜れない堎合は NO半角英倧文字ず出力し...
37,634
JOI 王章(JOI Emblem) 情報オリンピック日本委員䌚では台湟倧䌚に向かう遞手を応揎するために新しいJOI 旗を䜜成するこずにした JOI 旗は正方圢が瞊に $M$ 行暪に $N$ 列䞊んだ圢をしおおり各正方圢には JOI のいずれかの文字が1 ぀ず぀曞かれおいる 情報オリンピック日本委員䌚はJOI 旗ずは別にJOI 王章ずいうものを決めおいるJOI 王章は正方圢が瞊に2 行暪に2 列䞊んだ圢をしおおり各正方圢にはJOI のいずれかの文字が1 ぀ず぀曞かれおいる JOI 旗に含たれるJOI 王章の個数ずはJOI 旗に含たれる瞊2 行暪2 列の領域のうちその領域のJOI の配眮がJOI...
37,635
A : Taps / 蛇口 Problem あいづ君の家の济槜には2぀の蛇口 A , B が぀いおおり、 ひねるずひねった角床に比䟋した量の氎が出おくる。 出おくる氎の枩床は A は t A [℃]、 B は t B [℃]で䞀定である。 颚呂に入るずきにはそれらの量を調節しお混ぜあわせるこずで適床な枩床になるようにしおいる。 t A [℃] の氎 v A [L] ず t B [℃]の氎 v B [L] を混ぜ合わせた埌の枩床は、( t A × v A + t B × v B ) / ( v A + v B ) になる。 䟋えば、 t A = 80℃, t B = 20℃ で 40℃ のお湯を匵りたいずきには、 A から 100mL...
37,636
Problem I: Common Polynomial Math teacher Mr. Matsudaira is teaching expansion and factoring of polynomials to his students. Last week he instructed the students to write two polynomials (with a single variable x), and to report GCM (greatest common measure) of them as a homework, but he found it boring to check their ...
37,637
Problem J: 倚項匏の解の個数 きたたさ君は倧孊でさたざたな倉換に぀いお研究しおいる。最近、きたたさ君が興味を持っおいる倉換は次のようなものである。 N+1個の敎数 a 0 , ..., a N を固定し、敎数 z を入力ずする。たた P を玠数ずする。 t = ( a N z N + a N-1 z N-1 + ... + a 2 z 2 + a 1 z + a 0 ) mod P きたたさ君はこの倉換によっお t = 0 になっおしたう z がいく぀もあるこずに気が぀いた。 そこで、きたたさ君は友人でありスヌパヌプログラマヌでもあるあなたに、倉換埌に t = 0 になる z が 0〜P-1 にいく぀あるかを蚈算しおもらう...
37,638
Score : 500 points Problem Statement You have a string A = A_1 A_2 ... A_n consisting of lowercase English letters. You can choose any two indices i and j such that 1 \leq i \leq j \leq n and reverse substring A_i A_{i+1} ... A_j . You can perform this operation at most once. How many different strings can you obtain? ...
37,639
テトラ姫のパズル パレス王囜のテトラ姫は無類のパズル奜きずしお知られおおり最近は自身が考案した「テトラパズル」に熱䞭しおいる これは正䞉角圢のマスを敷き詰めたボヌドずテトラブロックず呌ばれる 4 枚の正䞉角圢のパネルからなる正四面䜓のブロックを䜿ったパズルである パズルの目的はボヌド䞊のすべおのテトラブロックを以䞋の条件をみたすように展開するこずである 展開されたテトラブロックが眮かれおいたマスおよびそれぞれに指定された異なる 2 ぀のマスを芆っおいる どのマスも2 ぀以䞊のパネルで芆われおいない 図F-1はテトラパズルの問題䟋およびその解答䟋である ★のマスず●のマスにテトラブロックが眮かれおおりそれぞれ...
37,640
Problem C Sibling Rivalry You are playing a game with your elder brother. First, a number of circles and arrows connecting some pairs of the circles are drawn on the ground. Two of the circles are marked as the start circle and the goal circle . At the start of the game, you are on the start circle. In each turn of the...
37,641
Score : 700 points Problem Statement You are given a string s of length n . Does a tree with n vertices that satisfies the following conditions exist? The vertices are numbered 1,2,..., n . The edges are numbered 1,2,..., n-1 , and Edge i connects Vertex u_i and v_i . If the i -th character in s is 1 , we can have a co...
37,642
Problem C: Dial Lock A dial lock is a kind of lock which has some dials with printed numbers. It has a special sequence of numbers, namely an unlocking sequence, to be opened. You are working at a manufacturer of dial locks. Your job is to verify that every manufactured lock is unlocked by its unlocking sequence. In ot...
37,643
鉄道路線 耇線䞊りず䞋りが別の線路になっおいおどこででもすれ違えるの鉄道路線がありたす。この路線には終端駅を含めお11 の駅があり、それぞれの駅ず駅の間は図で瀺す区間番号で呌ばれおいたす。 この路線の䞡方の終端駅から列車が同時に出発しお、途䞭で停たらずに走りたす。各区間の長さず2 本の列車の速床を読み蟌んで、それぞれの堎合に぀いお列車がすれ違う区間の番号を出力するプログラムを䜜成しおください。ただし、ちょうど駅のずころですれ違う堎合は、䞡偎の区間番号のうち小さいほうの数字を出力したす。たた、列車の長さ、駅の長さは無芖できるものずしたす。 Input 耇数のデヌタセットが䞎えられる。各デヌタセットは以䞋のような圢匏で䞎えられる。 ...
37,644