上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 65 下一页
摘要: Handling Sum Queries After Update You are given two 0-indexed arrays nums1 and nums2 and a 2D array queries of queries. There are three types of queri 阅读全文
posted @ 2023-02-19 10:16 onlyblues 阅读(41) 评论(0) 推荐(0)
摘要: D. Triangle Coloring You are given an undirected graph consisting of $n$ vertices and $n$ edges, where $n$ is divisible by $6$. Each edge has a weight 阅读全文
posted @ 2023-02-18 16:19 onlyblues 阅读(124) 评论(0) 推荐(0)
摘要: 约数之和 假设现在有两个自然数 $A$ 和 $B$,$S$ 是 $A^B$ 的所有约数之和。 请你求出 $S \bmod 9901$ 的值是多少。 输入格式 在一行中输入用空格隔开的两个整数 $A$ 和 $B$。 输出格式 输出一个整数,代表 $S \bmod 9901$ 的值。 数据范围 $0 \ 阅读全文
posted @ 2023-02-18 11:50 onlyblues 阅读(86) 评论(0) 推荐(0)
摘要: 台阶-Nim游戏 现在,有一个 $n$ 级台阶的楼梯,每级台阶上都有若干个石子,其中第 $i$ 级台阶上有 $a_i$ 个石子$(i \geq 1)$。 两位玩家轮流操作,每次操作可以从任意一级台阶上拿若干个石子放到下一级台阶中(不能不拿)。 已经拿到地面上的石子不能再拿,最后无法进行操作的人视为失 阅读全文
posted @ 2023-02-16 19:01 onlyblues 阅读(109) 评论(0) 推荐(0)
摘要: Nim游戏 给定 $n$ 堆石子,两位玩家轮流操作,每次操作可以从任意一堆石子中拿走任意数量的石子(可以拿完,但不能不拿),最后无法进行操作的人视为失败。 问如果两人都采用最优策略,先手是否必胜。 输入格式 第一行包含整数 $n$。 第二行包含 $n$ 个数字,其中第 $i$ 个数字表示第 $i$ 阅读全文
posted @ 2023-02-15 23:35 onlyblues 阅读(152) 评论(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 阅读(110) 评论(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 阅读(187) 评论(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 阅读(88) 评论(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 阅读(55) 评论(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 阅读(65) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 65 下一页
Web Analytics