Ice Cave Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Description You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lowe…
C. Ice Cave time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to…
题意:给定 n * m的矩阵,让你并给定初始坐标和末坐标,你只能走'.',并且走过的'.'都会变成'X',然后问你能不能在末坐标是'X'的时候走进去. 析:这个题,在比赛时就是没做出来,其实是一个水题,但是我理解错了意思,让下面提示的第一组样例给搞乱. 思路应该是这样的,从开始坐标BFS末坐标,把经过的都标成'X',如果直到末坐标是'.',接着走,如果能直到末坐标是'X',就是可以,否则就是不可以. 代码如下: #include <bits/stdc++.h> using namespace…
题目链接:https://vjudge.net/contest/226823#problem/C You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend one level lower and the only way to do this is to fall through t…
http://codeforces.com/problemset/problem/540/C       Ice Cave Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 540C Description You play a computer game. Your character stands on some lev…
C. Ice Cave Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/540/problem/C Description You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend…
D. Vladik and Favorite Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output This is an interactive problem. Vladik has favorite game, in which he plays all his free time. Game field could…
题意: 有n个城市 m条边,每条边的权值为1,每个城市生产一种商品(可以相同,一共k种),求出分别从每个城市出发获得s种商品时所走过路的最小权值 解析: 我们倒过来想,不用城市找商品,而是商品找城市,求出每个商品到达每个城市的最短路,w[i][j]即为生产商品j的城市到达城市i的最短路,最后对于每个i排序w[i] 取前s个小的即可 #include <bits/stdc++.h> #define mem(a, b) memset(a, b, sizeof(a)) using namespace…
题目传送门 题目大意: 给出一幅n*n的字符,从1,1位置走到n,n,会得到一个字符串,你有k次机会改变某一个字符(变成a),求字典序最小的路径. 题解: (先吐槽一句,cf 标签是dfs题????) 这道题又学到了,首先会发现,从原点出发,走x步,所有的情况都是在一条斜线上的,而再走一步就是下一条斜线.所以用两个队列进行bfs(把当前步和下一步要处理的字符分开). 到了这里思路就明朗了,每次走的时候如果本身的map里是a就直接走,不是a就看k是否大于0,再看这个字符是不是比答案串里对应位置的字…
Knight Moves Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8831    Accepted Submission(s): 5202 Problem Description A friend of you is doing research on the Traveling Knight Problem (TKP) wher…