<题目链接> 题目大意: 在一个立体迷宫中,问你从起点走到终点的最少步数。 解题分析: 与普通的BFS基本类似,只需要给数组多加一维,并且走的时候多加 上、下这两个方向就行。 2018-08-30 ...
分类:
其他好文 时间:
2018-08-30 23:29:45
阅读次数:
222
题目描述 有一棵点数为 N 的树,以点 1 为根,且树点有边权。然后有 M 个 操作,分为三种: 操作 1 :把某个节点 x 的点权增加 a 。 操作 2 :把某个节点 x 为根的子树中所有点的点权都增加 a 。 操作 3 :询问某个节点 x 到根的路径中所有点的点权和。 输入 第一行包含两个整数 ...
分类:
其他好文 时间:
2018-08-30 10:55:16
阅读次数:
161
任意门:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1610 Count the Colors Painting some colored segments on a line, some previously paint ...
分类:
其他好文 时间:
2018-08-29 20:30:31
阅读次数:
167
Chiaki has an n × m matrix A. Rows are numbered from 1 to n from top to bottom and columns are numbered from 1 to m from left to right. The element in ...
分类:
其他好文 时间:
2018-08-27 23:21:36
阅读次数:
233
题面 相比 wildleopard 的家,他的弟弟 mildleopard 比较穷。他的房子是狭窄的而且在他的房间里面仅有一个灯泡。每天晚上,他徘徊在自己狭小的房子里,思考如何赚更多的钱。有一天,他发现他的影子的长度随着他在灯泡和墙壁之间走到时发生着变化。一个突然的想法出现在脑海里,他想知道他的影子 ...
分类:
其他好文 时间:
2018-08-26 15:42:56
阅读次数:
264
https://vjudge.net/contest/67836#problem/C The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the ...
分类:
其他好文 时间:
2018-08-24 11:43:33
阅读次数:
145
T1 井字棋 题意:给定一井字棋残局,问结果 状压记忆化暴搜,博弈 1 #include<stdio.h> 2 #include<cstdlib> 3 #include<algorithm> 4 #include<cstring> 5 using namespace std; 6 int po[20 ...
分类:
其他好文 时间:
2018-08-22 22:52:52
阅读次数:
399
5838. 旅游路线 (Standard IO) Time Limits: 1000 ms Memory Limits: 131072 KB Detailed Limits Goto ProblemSet Description GZOI队员们到X镇游玩。X镇是一个很特别的城镇,它有m+1条东西方向 ...
分类:
其他好文 时间:
2018-08-21 21:49:08
阅读次数:
197
题意:n个人站成一排,每个人任意从1——m中任意取一个数,要求相邻两个人的如果数字相同,数字要大于k。 分划思想推导表达式: 假设 i 个人时。第i个人的选择有两种一种是选择小于等于k的数,另一种是大于k的数。则设这两种情况的组合数分别为F(i)和 G(i) 那么F(i)=(m-k)(F(i-1)+ ...
分类:
其他好文 时间:
2018-08-19 20:04:01
阅读次数:
157
题目链接 "bzoj3111: [Zjoi2013]蚂蚁寻路" 题解 发现走出来的图是一向上的凸起锯齿状 对于每个突出的矩形dp一下就好了 代码 c++ / / include include const int maxn = 127; inline int read() { int x = 0,f ...
分类:
其他好文 时间:
2018-08-18 23:39:15
阅读次数:
180