Gym 100971J-Robots at Warehouse】的更多相关文章

题目链接:http://codeforces.com/gym/100971/problem/J J. Robots at Warehouse time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output Vitaly works at the warehouse. The warehouse can be represented as a grid of n ×…
题意 链接给你一个n*m的地图,'#'代表墙,‘.’代表可走的,1代表1号机器人,2代表2号机器人,机器人可以上下左右移动到非墙的位置,但不能走到另一个机器人身上.问能否交换1和2的位置. 分析 如果1和2之间有路径且路径上某个点的度大于2,那就是YES,如果1和2的路径构成一个回路也是YES.其他情况就是NO. 代码 #include<cstdio> #define N 200005 int n,m,ux,uy,ax,ay,a[N],u[N],ck,ans,fx[4]= {1,-1,0,0}…
Vitaly works at the warehouse. The warehouse can be represented as a grid of n × m cells, each of which either is free or is occupied by a container. From every free cell it's possible to reach every other free cell by moving only through the cells s…
Statements Vitaly works at the warehouse. The warehouse can be represented as a grid of n × mcells, each of which either is free or is occupied by a container. From every free cell it's possible to reach every other free cell by moving only through t…
G. Robots time limit per test 5.0 s memory limit per test 256 MB input standard input output standard output The Robotics Olympiad teams were competing in a contest. There was a tree drawn on the floor, consisting of n nodes and n - 1 edges. The node…
Gym - 101915A  Printing Books 题意:有一本书,从第X页开始,一共用了n位数字,求此书一共多少页.99就是两位数字,100就是三位数字. 思路:直接模拟即可,我用了一个high和一个low,因为我把数字按位数分成了几个部分,1-9,10-99,100-999等(实际上high会等于1000),这样就会low = 100,high = 999之类的了,如果遇到边界,比如刚开始时,low和high有所调整,比如low=x,high=999,以方便计算. #include<…
要back的题目 目标是全绿!back一题删一题! acmm7 1003 1004 acmm8 1003 1004 sysu20181013 Stat Origin Title Solved A Gym 100624A Kingdoms   B Gym 100624B Who wants to live forever? Solved C Gym 100624C Chemist's vows   D Gym 100624D Non-boring sequences Attempted E Gym…
题目链接:http://codeforces.com/gym/100971/problem/J Vitaly works at the warehouse. The warehouse can be represented as a grid of n × m cells, each of which either is free or is occupied by a container. From every free cell it's possible to reach every ot…
传送门 The Robotics Olympiad teams were competing in a contest. There was a tree drawn on the floor, consisting of n nodes and n - 1 edges. The nodes are numbered from 1 to n, and each edge has a weight. The tree is rooted at the first node. q teams are…
Crashing Robots Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9859   Accepted: 4209 Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destination…