上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 64 下一页
摘要: Nim游戏 给定 $n$ 堆石子,两位玩家轮流操作,每次操作可以从任意一堆石子中拿走任意数量的石子(可以拿完,但不能不拿),最后无法进行操作的人视为失败。 问如果两人都采用最优策略,先手是否必胜。 输入格式 第一行包含整数 $n$。 第二行包含 $n$ 个数字,其中第 $i$ 个数字表示第 $i$ 阅读全文
posted @ 2023-02-15 23:35 onlyblues 阅读(146) 评论(0) 推荐(0)
摘要: 能被整除的数 给定一个整数 $n$ 和 $m$ 个不同的质数 $p_1,p_2, \ldots ,p_m$。 请你求出 $1 \sim n$ 中能被 $p_1,p_2, \ldots ,p_m$ 中的至少一个数整除的整数有多少个。 输入格式 第一行包含整数 $n$ 和 $m$。 第二行包含 $m$ 阅读全文
posted @ 2023-02-14 20:29 onlyblues 阅读(107) 评论(0) 推荐(0)
摘要: D. Moscow Gorillas In winter, the inhabitants of the Moscow Zoo are very bored, in particular, it concerns gorillas. You decided to entertain them and 阅读全文
posted @ 2023-02-13 17:52 onlyblues 阅读(185) 评论(0) 推荐(0)
摘要: B. Fedya and Array For his birthday recently Fedya was given an array $a$ of $n$ integers arranged in a circle, For each pair of neighboring numbers ( 阅读全文
posted @ 2023-02-13 16:22 onlyblues 阅读(87) 评论(0) 推荐(0)
摘要: Subsequence With the Minimum Score You are given two strings $s$ and $t$ . You are allowed to remove any number of characters from the string t. The s 阅读全文
posted @ 2023-02-12 22:54 onlyblues 阅读(52) 评论(0) 推荐(0)
摘要: Substring XOR Queries You are given a binary string s , and a 2D integer array queries where queries[i] = [firsti, secondi] . For the ith query, find 阅读全文
posted @ 2023-02-12 15:49 onlyblues 阅读(63) 评论(0) 推荐(0)
摘要: Count the Number of Fair Pairs Given a 0-indexed integer array nums of size n and two integers lower and upper , return the number of fair pairs. A pa 阅读全文
posted @ 2023-02-12 15:28 onlyblues 阅读(106) 评论(0) 推荐(0)
摘要: 找数字 给定一个正整数 $m$ 和一个非负整数 $s$。 请你找到长度为 $m$ 且各位数字之和为 $s$ 的最小和最大非负整数。 要求所求非负整数不得包含前导零。 输入格式 共一行,两个整数 $m,s$。 输出格式 在一行内输出满足条件的最小和最大非负整数。 如果无解,则输出 -1 -1。 数据范 阅读全文
posted @ 2023-02-12 10:16 onlyblues 阅读(103) 评论(0) 推荐(0)
摘要: B. Jumbo Extra Cheese 2 Pak Chanek has $n$ two-dimensional slices of cheese. The $i$-th slice of cheese can be represented as a rectangle of dimension 阅读全文
posted @ 2023-02-11 22:06 onlyblues 阅读(73) 评论(0) 推荐(0)
摘要: D. Moving Dots We play a game with $n$ dots on a number line. The initial coordinate of the $i$-th dot is $x_i$. These coordinates are distinct. Every 阅读全文
posted @ 2023-02-11 21:13 onlyblues 阅读(115) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 64 下一页
Web Analytics