上一页 1 2 3 4 5 6 7 8 9 10 ··· 53 下一页
摘要: 小苯的逆序对 题目描述 小苯有一个长度为 $n$ 的排列 $p$。他很想知道这个排列中有多少个逆序对满足互素。 形式化的,有多少个满足 $(i<j)$ 且 $(a_i > a_j)$ 且 $gcd(a_i, a_j) = 1$ 的 $(i, j)$ 对。 输入描述: 输入包含两行。 第一行一个正整数 阅读全文
posted @ 2024-02-16 22:55 onlyblues 阅读(76) 评论(0) 推荐(1) 编辑
摘要: D. Sasha and a Walk in the City Sasha wants to take a walk with his girlfriend in the city. The city consists of $n$ intersections, numbered from $1$ 阅读全文
posted @ 2024-02-16 18:28 onlyblues 阅读(129) 评论(1) 推荐(1) 编辑
摘要: 数组成鸡 题目描述 小鸡有一个由整数组成的数组,小鸡可以对这个数组进行任意次(可以不进行)全数组每个数加一或全数组每个数减一的操作。 现在,小鸡想让你回答 $Q$ 次询问,每次询问给出一个整数 $M$,你需要回答任意次(可以不操作)操作后是否可以使得给定数组的乘积等于给出的整数 $M$。 输入描述: 阅读全文
posted @ 2024-02-15 20:31 onlyblues 阅读(14) 评论(0) 推荐(0) 编辑
摘要: G. One-Dimensional Puzzle You have a one-dimensional puzzle, all the elements of which need to be put in one row, connecting with each other. All the 阅读全文
posted @ 2024-02-14 20:19 onlyblues 阅读(61) 评论(1) 推荐(1) 编辑
摘要: D. Lonely Mountain Dungeons Once, the people, elves, dwarves, and other inhabitants of Middle-earth gathered to reclaim the treasures stolen from them 阅读全文
posted @ 2024-02-13 20:33 onlyblues 阅读(35) 评论(0) 推荐(0) 编辑
摘要: E. Space Harbour There are $n$ points numbered $1$ to $n$ on a straight line. Initially, there are $m$ harbours. The $i$-th harbour is at point $X_i$ 阅读全文
posted @ 2024-02-13 12:59 onlyblues 阅读(6) 评论(0) 推荐(0) 编辑
摘要: E. Klever Permutation You are given two integers $n$ and $k$ ($k \le n$), where $k$ is even. A permutation of length $n$ is an array consisting of $n$ 阅读全文
posted @ 2024-02-10 12:07 onlyblues 阅读(28) 评论(0) 推荐(0) 编辑
摘要: G. Paint Charges A horizontal grid strip of $n$ cells is given. In the $i$-th cell, there is a paint charge of size $a_i$. This charge can be: either 阅读全文
posted @ 2024-02-09 19:14 onlyblues 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Tokitsukaze and Min-Max XOR 题目描述 Tokitsukaze 有一个长度为 $n$ 的序列 $a_1,a_2,\ldots,a_n$​ 和一个整数 $k$。 她想知道有多少种序列 $b_1,b_2,\ldots,b_m$​,满足: $1 \leq b_i \leq n$ 阅读全文
posted @ 2024-02-06 18:40 onlyblues 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Tokitsukaze and Slash Draw 题目描述 在游戏王中有一张魔法卡叫做「一击必杀!居合抽卡」。 简单来说,当你发动这张卡后,你会从卡组最上方抽取一张卡,如果那张卡是「一击必杀!居合抽卡」的情况下,有大概率''一击必杀''打败对手。通常这张卡被玩家们称作''拔刀''。 在游戏王中, 阅读全文
posted @ 2024-02-06 13:38 onlyblues 阅读(102) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 53 下一页
Web Analytics