
牛客多校
文章平均质量分 68
Elicsyd
这个作者很懒,什么都没留下…
展开
-
xay loves or
Description xay loves or. He gives you x and s, you need to calculate how many positive integer y satisfy x or y = s. Input The first line contains two positive integers x and s . It’s guaranteed that 1 ≤ x, s < 2 31 . Output Print the number of y satis原创 2021-08-07 20:24:04 · 171 阅读 · 1 评论 -
Holding Two
Given n, m, construct a matrix A of size n × m, whose entries are all either 0 or 1, and no three distinct entries Ai1,j1 , Ai2,j2 , Ai3,j3 satisfying that Ai1,j1 = Ai2,j2 = Ai3,j3 , −1 ≤ i1 − i2 = i2 − i3 ≤ 1, −1 ≤ j1 − j2 = j2 − j3 ≤ 1. If multiple solut原创 2021-08-01 09:41:55 · 125 阅读 · 0 评论 -
LCS2021牛客暑期多校训练营4
链接:https://ac.nowcoder.com/acm/contest/11255/C 来源:牛客网 题目描述 Let LCS(s1,s2)LCS(s_1,s_2)LCS(s1,s2) denote the length of the longest common subsequence (not necessary continuity) of string s1s_1s1 and string s2s_2s2. Now give you four integers a,b,c..原创 2021-07-26 20:44:15 · 137 阅读 · 0 评论 -
Just a joke
链接:https://ac.nowcoder.com/acm/contest/11255/F 来源:牛客网 题目描述 Alice and Bob are playing a game. At the beginning, there is an undirected graph GGG with nnn nodes. Alice and Bob take turns to operate, Alice will play first. The player who can't operate wil.原创 2021-07-26 20:21:07 · 164 阅读 · 0 评论 -
Math 2021牛客暑期多校训练营 3
链接:https://ac.nowcoder.com/acm/contest/11254/E 来源:牛客网 题目描述 Given n, count the number of pairs of positive integers (x, y), such that xy+1∣x2+y2,1≤x≤y≤nxy+1|x^2+y^2, 1\le x\le y \le nxy+1∣x2+y2,1≤x≤y≤n. There're t test cases in total. 输入描述: First lin.原创 2021-07-25 15:49:29 · 219 阅读 · 1 评论 -
计数三角形
链接:https://ac.nowcoder.com/acm/contest/11254/J 来源:牛客网 题目描述 古德亚特发现了一个没有方向的完整图形与n个顶点。图形的每个边缘都漆成黑色或白色。他想让你帮他找到三角形的数量(a,b,c)(一个<b<c),这样(a,b),(b,c),(c,a)之间的边缘有相同的颜色。为了避免输入比例过大,我们使用以下代码生成图表中的边缘。 <span style="color:#333333">namespaceGenHelp..原创 2021-07-25 11:16:01 · 193 阅读 · 1 评论 -
Girlfriend
链接:https://ac.nowcoder.com/acm/contest/11253/F 来源:牛客网 题目描述 ZYTand ZFeTare great PUAs and both have two girlfriends,but they never think that their girlfriends could be so great at magic. One day, whenZYTandZFeTwerebusy training PU skills,they...原创 2021-07-23 10:41:25 · 209 阅读 · 1 评论 -
Er Ba Game
链接:https://ac.nowcoder.com/acm/contest/11253/D 来源:牛客网 题目描述 Er Ba Game is a popular card game in China's Province Zhejiang. In this problem, the game involves two players and 36 cards - 2,3,⋯ ,102,3,\cdots, 102,3,⋯,10, each withfour. In the game each p..原创 2021-07-20 10:39:50 · 111 阅读 · 0 评论 -
Draw Grids
链接:https://ac.nowcoder.com/acm/contest/11253/C 来源:牛客网 题目描述 ZYT and LBC decided to play a game. They will alternately do the following operation. Pick 4 integersa,b,c,d(1≤a,c≤na,b,c,d(1\leq a,c \leq na,b,c,d(1≤a,c≤nand 1≤b,d≤m)\ 1\leq b,d \leq ...原创 2021-07-20 10:38:24 · 164 阅读 · 0 评论 -
Game of Swapping Numbers
链接:https://ac.nowcoder.com/acm/contest/11166/G 来源:牛客网 题目描述 Given two arrays A, B with length N, you should perform exactly K operations in array A. For each operation, choose 2 elementsAi,Aj(1≤i<j≤N)A_i, A_j(1 \leq i < j \leq N)Ai,Aj(1≤i<j≤..原创 2021-07-19 09:53:23 · 158 阅读 · 0 评论 -
2021牛客暑期多校训练营1Determine the Photo Position
链接:https://ac.nowcoder.com/acm/contest/11166/D 来源:牛客网 题目描述 You have taken the graduation picture of graduates. The picture could be regarded as a matrix A of n×nn \times nn×n, each element in A is 0 or 1, representing a blank background or a student, r.原创 2021-07-17 21:18:45 · 134 阅读 · 0 评论 -
2021牛客暑期多校训练营1Find 3-friendly Integers
链接:https://ac.nowcoder.com/acm/contest/11166/F 来源:牛客网 题目描述 A positive integer is 3-friendly if and only if we can find a continuous substring in its decimal representation, and the decimal integer represented by the substring is a multiple of 333. For .原创 2021-07-17 21:15:45 · 241 阅读 · 0 评论 -
2021牛客暑期多校训练营1Ball Dropping
链接:https://ac.nowcoder.com/acm/contest/11166/B 来源:牛客网 题目描述 A standard sphere ball is falling in the air, and the center of the sphere is exactly on the centerline of an empty isosceles trapezoidal. The trapezoid is hanging horizontally under the sphere.原创 2021-07-17 21:06:43 · 165 阅读 · 0 评论