task stringlengths 0 154k | __index_level_0__ int64 0 39.2k |
|---|---|
Score : 600 points Problem Statement We have N colored balls arranged in a row from left to right; the color of the i -th ball from the left is c_i . You are given Q queries. The i -th query is as follows: how many different colors do the l_i -th through r_i -th balls from the left have? Constraints 1\leq N,Q \leq 5 \t... | 39,239 |
D: 貪欲が最適? 物語 1 , 5 , 10 , 50 , 100 , 500 円玉がある日本では、ある金額を支払う時、大きい金額の硬貨をできるだけ多く使うという方法で支払うと、硬貨の枚数を最小化できることが知られている。 硬貨の金額が日本とは異なる場合、貪欲に支払うと必ずしも最小化できるとは限らない。 貪欲に支払うのが最適になるために、硬貨の金額が満たすべき条件は何なのだろうか。 問題 TAB 君は上のことが気になったので、まずは硬貨が 1 , A , B の 3 種類しかない場合について考えることにした。 A , B が与えられるので、貪欲に支払った場合枚数が最小にならないような金額のうち、最小のものを出力せよ。 また、どんな... | 39,240 |
Score : 100 points Problem Statement Takahashi loves takoyaki - a ball-shaped snack. With a takoyaki machine, he can make at most X pieces of takoyaki at a time, taking T minutes regardless of the number of pieces to make. How long does it take to make N takoyaki? Constraints 1 \leq N,X,T \leq 1000 All values in input ... | 39,241 |
Problem C: Ball Problem $N$個のボールがあり、各ボールには色と価値が決められている。 ボールの色は$1$から$C$まで$C$種類存在し、各色ごとに選べるボールの数の上限が決められている。 ボールを全体で高々$M$個選ぶとき、得られる価値の合計を最大化せよ。 Input 入力は以下の形式で与えられる。 $N$ $M$ $C$ $l_1$ $l_2$ ... $l_C$ $c_1$ $w_1$ $c_2$ $w_2$ ... $c_N$ $w_N$ 入力はすべて整数で与えられる。 1行目に$N$, $M$, $C$が空白区切りで与えられる。 2行目に色$i$の選べるボールの数の上限$l_i$($1 \leq i... | 39,242 |
Score : 1700 points Problem Statement Snuke has an integer sequence A whose length is N . He likes permutations of (1, 2, ..., N) , P , that satisfy the following condition: P_i \leq A_i for all i ( 1 \leq i \leq N ). Snuke is interested in the inversion numbers of such permutations. Find the sum of the inversion numbe... | 39,243 |
Score : 900 points Problem Statement Let us consider a grid of squares with N rows and N columns. You want to put some domino pieces on this grid. Each domino piece covers two squares that have a common side. Each square can be covered by at most one piece. For each row of the grid, let's define its quality as the numb... | 39,244 |
Problem H: Viva Confetti Do you know confetti ? They are small discs of colored paper, and people throw them around during parties or festivals. Since people throw lots of confetti, they may end up stacked one on another, so there may be hidden ones underneath. A handful of various sized confetti have been dropped on a... | 39,245 |
Score : 100 points Problem Statement You are given three words s_1 , s_2 and s_3 , each composed of lowercase English letters, with spaces in between. Print the acronym formed from the uppercased initial letters of the words. Constraints s_1 , s_2 and s_3 are composed of lowercase English letters. 1 ≤ |s_i| ≤ 10 (1≤i≤3... | 39,246 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.