自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 方阵(square)题解

现在你可以交换 A 的任意两行或两列,问经过若干次操作之后,能否将 A 变成 B?如果可以输出最少的操作次数,否则输出 -1。有两个 n×n 的方阵 A,B ,其中每一行每一列都恰好包含了 1~n。接下来 n 行,每行 n 个元素,表示方阵 A。接下来 n 行,每行 n 个元素,表示方阵 B。第一行输入一个正整数 n。输出一个整数,表示答案。下面,看下各个数组情况。

2022-10-16 11:03:21 191 1

原创 P,NP,NPC,NP-Hard问题

先引出话题:大家还记得世纪之问吗?**究竟是不是所有的NP问题都是P问题**? 那么,**什么是$P$问题,什么是$NP$问题,什么是$NPC$问题,而什么是$NP-Hard$问题呢**? 下面,来介绍一下$P$,$NP$问题,$NPC$,$NP-Hard$问题: 1.$P$问题: $P$ 问题指的是在规定的时间复杂度内能够解决的问题,for example 计算a+b,背包问题,高斯消元法求线性方程。 2.$NP$问题: $NP$问题指的是在规定时间内能够验证答案对或者错的问题

2022-09-13 22:19:40 191

原创 NIO‘s Sword题解报告

NIO is playing a new game. In this game, NIO has a sword with attack power represented by an integer $A$. Initially, $A=0$. There are also nn enemies in the game. NIO has to kill them in order, which means NIO must kill the $(i−1)-th$ enemy before killing

2022-08-21 21:48:13 82

原创 Here is an Easy Problem of Zero-chan题解报告

Zero-chan has a rooted tree with nn nodes. The root of given tree is node 1. She defines $f(x)=\prod_ {i=1}^nlca(x,i).$ $lca(x,i)$meas the Least Common Ancestor of node uu and node v. Zero-chan gives you some integers xx and asks you

2022-08-18 20:32:44 169

原创 Constructive Problems Never Die题解报告

**题目描述** Grammy has a sequence A of length n. Please find a permutation P such that Pi != Ai for all i. **输入描述:** There are multiple test cases. The first line contains a single integer T(1≤T≤100000), denoting the number of test cases. For each test cas

2022-08-09 16:51:11 203

原创 Birds in the tree题解报告

One day, when NIO was walking under the tree, he found that there are birds standing on the tree, and each bird is standing on one leaf. He wondered about in how many sub-trees form by connected vertex-induced subgraphs from the original tree, all birds ar

2022-08-03 11:38:39 125

原创 Wall Builder II题解报告

As the builder employed by NIO, you need to build more walls for him. Now you have a number of bricks of height 1 but with different lengths. More precisely, you have nnn bricks of length 1, n−1 bricks of length 2, …, two bricks of length n−1, and one bric

2022-07-31 16:50:57 218

原创 Jobs (Easy Version)题解报告

来源牛客网nnnmim_imi​IQEQAQIQ,EQ,andAQIQ,EQandAQIQ,EQ,andAQstdstdIQ,EQ,andAQi

2022-07-30 22:59:14 142

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除