上一页 1 2 3 4 5 6 7 8 ··· 32 下一页
摘要: Description 如果一棵树的所有非叶节点都恰好有 \(n\) 个儿子,那么我们称它为严格 \(n\) 元树。如果该树中最底层的节点深度为 \(d\)(根的深度为 \(0\)),那么我们称它为一棵深度为 \(d\) 的严格 \(n\) 元树。例如,深度为2的严格2元树有三个,如下图: 给出 \ 阅读全文
posted @ 2021-06-26 20:53 Wolfycz 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 题目传送门:https://codeforces.com/problemset/problem/280/C Description Momiji has got a rooted tree, consisting of \(n\) nodes. The tree nodes are numbered 阅读全文
posted @ 2021-06-26 02:29 Wolfycz 阅读(42) 评论(0) 推荐(0) 编辑
摘要: Description Find the biggest integer \(n (1\leqslant n\leqslant N)\) and an integer \(x\) to make them satisfy Input The input consists of several tes 阅读全文
posted @ 2021-06-25 21:26 Wolfycz 阅读(51) 评论(0) 推荐(0) 编辑
摘要: Description Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zball is magic. It grows larger every day 阅读全文
posted @ 2021-06-25 20:16 Wolfycz 阅读(50) 评论(0) 推荐(0) 编辑
摘要: Description iSea is tired of writing the story of Harry Potter, so, lucky you, solving the following problem is enough. Input The first line contains 阅读全文
posted @ 2021-06-25 19:38 Wolfycz 阅读(39) 评论(0) 推荐(0) 编辑
摘要: Description There is a \(n×m\) board, a chess want to go to the position \((n,m)\) from the position \((1,1)\). The chess is able to go to position \( 阅读全文
posted @ 2021-06-25 16:31 Wolfycz 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Description The so-called best problem solver can easily solve this problem, with his/her childhood sweetheart. It is known that \(y=(5+2\sqrt{6})^{1+ 阅读全文
posted @ 2021-06-25 16:01 Wolfycz 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Description Math is important!! Many students failed in 2+2’s mathematical test, so let's AC this problem to mourn for our lost youth.. Look this samp 阅读全文
posted @ 2021-06-25 15:31 Wolfycz 阅读(53) 评论(0) 推荐(0) 编辑
摘要: Description Chiaki is interested in an infinite sequence \(a_1,a_2,a_3,...\) which is defined as follows: \(a_n=\begin{cases} 1 &,n=1,2\\a_{n−a_{n−1}} 阅读全文
posted @ 2021-06-25 14:54 Wolfycz 阅读(44) 评论(0) 推荐(0) 编辑
摘要: Description There is a complete graph containing \(n\) vertices, the weight of the \(i\)-th vertex is \(w_i\). The length of edge between vertex \(i\) 阅读全文
posted @ 2021-06-25 14:22 Wolfycz 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Description There is a nonnegative integer sequence \(a_{1...n}\) of length \(n\). HazelFan wants to do a type of transformation called prefix-XOR, wh 阅读全文
posted @ 2021-06-25 12:09 Wolfycz 阅读(50) 评论(0) 推荐(0) 编辑
摘要: Description 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为$(1,1)\(, 右下角点为\)(N,M)$(上图中$N=3$,\(M=4\)).有以下三种 阅读全文
posted @ 2020-10-18 23:58 Wolfycz 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Description 已知一个长度为$n$的正整数序列$A$(下标从1开始), 令 \(S = \{ x | 1 \leqslant x \leqslant n \}\), $S$的幂集$2S$定义为$S$所有子集构成的集合。定义映射$ f : 2S \to Z,f(\emptyset) = 0, 阅读全文
posted @ 2020-09-18 13:02 Wolfycz 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 线性基是竞赛中常用来解决子集异或一类题目的算法。(摘自百度百科) 线性基是一个整数序列的特殊集合,每个序列都至少存在一个线性基,同一个序列可以拥有多个不同的线性基;反过来,一个线性基只对应一个确定的序列。 线性基存在如下三条性质: 原序列中任意一个数都可以由若干个线性基内的数异或得到 线性基内的数无 阅读全文
posted @ 2020-09-17 22:34 Wolfycz 阅读(408) 评论(0) 推荐(0) 编辑
摘要: Description 小马里卡正在创作一个奇妙的童话故事。她一边编故事,一边讲给她的爷爷听。爷爷可高兴了,于是问了她一些有趣的问题。 在小马里卡的故事中,有N个年龄分别为1~N岁的孩子(最小的1为岁,最大的为N岁)。有一天,她们一起乘火车出去旅行。铁路线上有好多个车站,分别以0, 1, 2, 3… 阅读全文
posted @ 2020-09-16 22:48 Wolfycz 阅读(171) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 32 下一页