Loading

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 74 下一页
摘要: 如果边权不大(1e6以下)的话可以不直接sort而是使用桶排序,开边权范围的vector数组不断往对应的vector里push_back边即可 阅读全文
posted @ 2021-07-25 11:14 脂环 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 链接: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≤ 阅读全文
posted @ 2021-07-25 00:23 脂环 阅读(375) 评论(2) 推荐(3) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/11254/J 来源:牛客网 题目描述 Goodeat finds an undirected complete graph with n vertices. Each edge of the graph is paint 阅读全文
posted @ 2021-07-24 19:07 脂环 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Problem Description Give you a cube with a side length of n-1. Find the number of equilateral triangles with three points on the cube point. Each side 阅读全文
posted @ 2021-07-23 10:42 脂环 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定一棵nn个点的带权树,结点下标从11开始到NN。寻找树中找两个结点,求最长的异或路径。 异或路径指的是指两个结点之间唯一路径上的所有边权的异或。 输入格式 第一行一个整数NN,表示点数。 接下来 n−1n−1 行,给出 u,v,wu,v,w ,分别表示树上的 uu 点和 vv 点有连边 阅读全文
posted @ 2021-07-22 00:40 脂环 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Problem Description Given a sequence of integers of length n, find the shortest consecutive subsequence witch XOR sum not less than k. If there are mu 阅读全文
posted @ 2021-07-21 16:22 脂环 阅读(539) 评论(6) 推荐(2) 编辑
摘要: Problem Description Let’s call a weighted connected undirected graph of n vertices and m edges KD-Graph, if the following conditions fulfill: * n vert 阅读全文
posted @ 2021-07-20 21:01 脂环 阅读(490) 评论(4) 推荐(2) 编辑
摘要: Problem Description Given n-1 points, numbered from 2 to n, the edge weight between the two points a and b is lcm(a, b). Please find the minimum spann 阅读全文
posted @ 2021-07-20 18:36 脂环 阅读(487) 评论(0) 推荐(0) 编辑
摘要: Problem Description Given a matrix of n rows and m columns,find the largest area submatrix which is non decreasing on each column Input The first line 阅读全文
posted @ 2021-07-20 18:29 脂环 阅读(159) 评论(2) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/11253/K 来源:牛客网 题目描述 ZYT had a magic permutation a1,a2,⋯ ,ana1,a2,⋯,an, and he constructed a sequence b1,b2,⋯bnb 阅读全文
posted @ 2021-07-20 10:53 脂环 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 74 下一页