摘要:
Description Alan loves to construct the towers of building bricks. His towers consist of many cuboids with square base. All cuboids have the same heig 阅读全文
摘要:
Description Coupons in cereal boxes are numbered $1$ to $n$, and a set of one of each is required for a prize (a cereal box, of course). With one coup 阅读全文
摘要:
Description Once upon a time Petya and Gena gathered after another programming competition and decided to play some game. As they consider most modern 阅读全文
摘要:
Description Given the finite multi set $A$ of $n$ pairs of integers, an another finite multi set $B$ of $m$ triples of integers, we define the product 阅读全文
摘要:
Description Ladies and gentlemen, please sit up straight. Don't tilt your head. I'm serious. For $n$ given strings $S_{1},S_{2},\cdots,S_{n}$, labelle 阅读全文
摘要:
Description Greg has an $m \times n$ grid of Sweet Lightbulbs of Pure Coolness he would like to turn on. Initially, some of the bulbs are on and some 阅读全文
摘要:
Description 给定一棵$N$个结点的树,结点用正整数$1 \dots N$编号,每条边有一个正整数权值。用$d(a, b)$表示从结点$a$到结点$b$路径上经过边的权值和,其中要求$a 第一行包含两个正整数$N,M$。 下面$N − 1$行,每行三个正整数$a, b, c (a, b \ 阅读全文
摘要:
Description Sonya was unable to think of a story for this problem, so here comes the formal description. You are given the array containing $n$ positi 阅读全文
摘要:
Description There are n casinos lined in a row. If Memory plays at casino $i$, he has probability $p_{i}$ to win and move to the casino on the right $ 阅读全文
摘要:
Description Memory is now interested in the de evolution of objects, specifically triangles. He starts with an equilateral triangle of side length $x$ 阅读全文