时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description You are a mouse that lives in a cage in a large laboratory. 你是一只生活在笼子里的实验室老鼠. The laboratory is composed of one rectangular grid of square cages, with a total of R rows and C columns of cage…
1267 老鼠的旅行 2012年CCC加拿大高中生信息学奥赛 题目描述 Description You are a mouse that lives in a cage in a large laboratory. 你是一只生活在笼子里的实验室老鼠. The laboratory is composed of one rectangular grid of square cages, with a total of R rows and C columns of cages (1 ≤ R,C…
http://codevs.cn/problem/1269/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题解 题目描述 Description Welcome to the Hungary Games! The streets of Budapest form a twisted network of one-way streets. 欢迎来到匈牙利游戏!布达佩斯(匈牙利首都)的街道形成了一个弯曲的单向网络. You have be…
1269 匈牙利游戏 2012年CCC加拿大高中生信息学奥赛 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description Welcome to the Hungary Games! The streets of Budapest form a twisted network of one-way streets. 欢迎来到匈牙利游戏!布达佩斯(匈牙利首都)的街道形成了一个弯曲的单向网络. You have been f…
可以暴力递归求解,应该不会TLE,但是我们考虑记忆化优化. 设f(i,j)表示第i个数为j时的方案数. f(i,j)=f(1,j-1)+f(2,j-1)+……+f(i-1,j-1) (4>=j>=1),从f(n,4)开始递归求解就行. 但是考虑到状态最多只有n*4种,所以记忆化掉吧. 初始化:f(i,1)=1 (1<=i<=n-3) #include<cstdio> using namespace std; int n; ][]; long long f(int cur…
时间限制: 1 s 空间限制: 128000 KB 题目等级 : 白银 Silver 题目描述 Description Sheldon and Leonard are physicists who are fixated on the BIG BANG theory. In order to exchange secret insights they have devised a code that encodes UPPERCASE words by shifting their lett…
1267 老鼠的旅行 2012年CCC加拿大高中生信息学奥赛 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 题目描述 Description You are a mouse that lives in a cage in a large laboratory. 你是一只生活在笼子里的实验室老鼠. The laboratory is composed of one rectangular grid of square cages, wit…
http://codevs.cn/problem/1267/ 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 题目描述 Description You are a mouse that lives in a cage in a large laboratory. 你是一只生活在笼子里的实验室老鼠. The laboratory is composed of one rectangular grid of square cage…