
构造题
尒轩窗
这个作者很懒,什么都没留下…
展开
-
E. Construct the Binary Tree
E. Construct the Binary Tree You are given two integersnnanddd. You need to construct a rooted binary tree consisting ofnnvertices with ...原创 2020-03-02 11:57:22 · 498 阅读 · 1 评论 -
Counting 4-Cliques
链接:https://www.nowcoder.com/acm/contest/145/E 题目描述 You love doing graph theory problems. You've recently stumbled upon a classical problem : Count the number of 4-cliques in an undirected graph. Giv...原创 2018-08-10 10:26:03 · 289 阅读 · 1 评论 -
Parentheses Matrix 【2018 Multi-University Training Contest 8 】
http://acm.hdu.edu.cn/showproblem.php?pid=6400 Problem Description A parentheses matrix is a matrix where every element is either '(' or ')'. We define the goodness of a parentheses matrix as...原创 2018-08-15 20:51:26 · 204 阅读 · 0 评论 -
2015 ACM/ICPC 北京区域赛现场赛 I—Snake Carpet【构造题】
http://media.hihocoder.com/contests/icpcbeijing2015/problems.pdf 题意: 构建一个包含1.。。。n长度的折线的矩形,长度为奇数的有奇数(正整数)个折点(1除外),长度为偶数的有偶数(正整数)个折点(2除外),输出矩形,从1到n,依次输出每个折线,折线按点的顺序输出。 分析: 构造题,特例1和2 代...原创 2018-09-30 22:06:30 · 361 阅读 · 0 评论 -
2015 ACM/ICPC 上海区域赛 现场赛第一场 B—Binary Tree 【二进制思维构造】
http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1002&cid=655 题意: 一个满二叉树,根节点的值为1,左儿子是父亲节点的二倍,右儿子是父亲节点的2倍+1,从根节点走k步【包括根节点】走过的点的需对当前值进行+该点或者-该点的操作,使得最后结果为N【N<=2^k】,输出过程 分析: 发现...原创 2018-10-01 19:49:34 · 627 阅读 · 0 评论