别套模板了 这款宝藏AE插件一键解决画面排版

很多人有着通过AE制作视频相册、图片相册的需求,但大家在有这种需求时第一时间想到的都是去找个合适的AE模板套入,但现在随着VE Super Grid分屏插件的上线,各位小伙伴又有了新选择!接下来给大家说说为什么选择VE Super Grid分屏插件以及VE Super Grid插件的使用方法。

为什么选择VE Super Grid分屏插件?

1.近百种排版预设,一键搞定排版;

 2.灵活调整边缘缝隙、圆角; 

 

3.各个分区的角点可以直接在预览区调整;

4.X、Y轴位移、缩放功能,轻松得到你想要的效果。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,这是一个比较复杂的问题,需要一些时间来解决。我可以为您提供一些思路和代码示例,帮助您完成这个任务。 首先,您需要用Java实现一个迷宫的数据结构。可以使用一个二维数组来表示迷宫,其中0表示空位,1表示墙,2表示入口,3表示出口,4表示宝藏。例如: ``` int[][] maze = { {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 2, 0, 1, 4, 0, 1, 0, 0, 1}, {1, 0, 1, 0, 1, 1, 1, 1, 1, 1}, {1, 0, 1, 0, 1, 0, 0, 0, 0, 1}, {1, 1, 1, 0, 1, 0, 1, 1, 1, 1}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 1, 1, 1, 1, 1, 1, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 1, 0, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 3, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1} }; ``` 接下来,您需要实现一个BFS算法来搜索最短路径。可以使用一个队列来存储每个节点,以及一个visited数组来记录每个节点是否被访问过。具体的实现方式可以参考以下代码: ```java import java.util.LinkedList; import java.util.Queue; public class ShortestPathFinder { private static final int[] dx = {0, 0, 1, -1}; private static final int[] dy = {1, -1, 0, 0}; public static int findShortestPath(int[][] maze) { int n = maze.length; int m = maze[0].length; int startX = -1, startY = -1, endX = -1, endY = -1; int treasures = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (maze[i][j] == 2) { startX = i; startY = j; } else if (maze[i][j] == 3) { endX = i; endY = j; } else if (maze[i][j] == 4) { treasures++; } } } boolean[][][] visited = new boolean[n][m][1 << treasures]; Queue<int[]> queue = new LinkedList<>(); queue.offer(new int[]{startX, startY, 0, 0}); visited[startX][startY][0] = true; while (!queue.isEmpty()) { int[] cur = queue.poll(); if (cur[0] == endX && cur[1] == endY && cur[3] == (1 << treasures) - 1) { return cur[2]; } for (int i = 0; i < 4; i++) { int nx = cur[0] + dx[i]; int ny = cur[1] + dy[i]; if (nx >= 0 && nx < n && ny >= 0 && ny < m && maze[nx][ny] != 1) { int treasuresCollected = cur[3]; if (maze[nx][ny] == 4) { treasuresCollected |= 1 << (maze[nx][ny] - 4); } if (!visited[nx][ny][treasuresCollected]) { visited[nx][ny][treasuresCollected] = true; queue.offer(new int[]{nx, ny, cur[2] + 1, treasuresCollected}); } } } } return -1; } } ``` 这个BFS算法使用了一个三维visited数组来记录每个节点是否被访问过,并且记录了已经收集到的宝藏信息。在搜索的过程中,如果到达终点并且收集到了所有的宝藏,就返回当前的步数作为最短路径。否则,将当前节点的邻居加入队列中,并且更新visited数组和宝藏信息。 最后,您可以在main方法中使用这个BFS算法,找到最短路径并输出结果。例如: ```java public static void main(String[] args) { int[][] maze = { {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 2, 0, 1, 4, 0, 1, 0, 0, 1}, {1, 0, 1, 0, 1, 1, 1, 1, 1, 1}, {1, 0, 1, 0, 1, 0, 0, 0, 0, 1}, {1, 1, 1, 0, 1, 0, 1, 1, 1, 1}, {1, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 0, 1, 1, 1, 1, 1, 1, 0, 1}, {1, 0, 0, 0, 0, 0, 0, 1, 0, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 3, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1} }; int shortestPath = ShortestPathFinder.findShortestPath(maze); System.out.println("The shortest path is " + shortestPath); } ``` 这样,您就可以成功地解决这个问题了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值