摘要:
题解: 一条路走到头,然后再回头 vis数组来标记已走过的点,a数组来存数字 1 #include <bits/stdc++.h> 2 using namespace std; 3 int n; 4 bool vis[20]; 5 int a[20]; 6 7 void dfs(int x) 8 { 阅读全文
posted @ 2023-07-04 23:21
上原歩夢
阅读(35)
评论(0)
推荐(0)
摘要:
题解: 这道题重点是行号和列号 !千万! 别搞反了,还有就是用dx 和 dy数组表示顺时针转动 1 dx = [-1, 0, 1, 0] 2 dy = [0, 1, 0, -1] 3 n, m = map(int, input().split()) # n行m列 4 x, y, d = 0, 0, 阅读全文
posted @ 2023-07-04 22:31
上原歩夢
阅读(35)
评论(0)
推荐(0)

浙公网安备 33010602011771号