摘要:
E1. PermuTree (easy version) This is the easy version of the problem. The differences between the two versions are the constraint on $n$ and the time 阅读全文
摘要:
A. Vika and Her Friends Vika and her friends went shopping in a mall, which can be represented as a rectangular grid of rooms with sides of length $n$ 阅读全文
摘要:
C. Particles You have discovered $n$ mysterious particles on a line with integer charges of $c_1,\dots,c_n$. You have a device that allows you to perf 阅读全文
摘要:
C. No Prime Differences You are given integers $n$ and $m$. Fill an $n$ by $m$ grid with the integers $1$ through $n\cdot m$, in such a way that for a 阅读全文
摘要:
Count of Integers You are given two numeric strings num1 and num2 and two integers max_sum and min_sum. We denote an integer x to be good if: num1 <= 阅读全文
摘要:
Maximum Strictly Increasing Cells in a Matrix Given a 1-indexed m x n integer matrix mat, you can select any cell in the matrix as your starting cell. 阅读全文
摘要:
D. The BOSS Can Count Pairs You are given two arrays $a$ and $b$, both of length $n$. Your task is to count the number of pairs of integers $(i,j)$ su 阅读全文
摘要:
股票买卖 V 给定一个长度为 $N$ 的数组,数组中的第 $i$ 个数字表示一个给定股票在第 $i$ 天的价格。 设计一个算法计算出最大利润。在满足以下约束条件下,你可以尽可能地完成更多的交易(多次买卖一支股票): 你不能同时参与多笔交易(你必须在再次购买前出售掉之前的股票)。 卖出股票后,你无法在 阅读全文
摘要:
B. Complete The Graph ZS the Coder has drawn an undirected graph of $n$ vertices numbered from $0$ to $n - 1$ and $m$ edges between them. Each edge of 阅读全文
摘要:
F. Ira and Flamenco Ira loves Spanish flamenco dance very much. She decided to start her own dance studio and found $n$ students, $i$th of whom has le 阅读全文