2018年11月19日
摘要: 【题目】 每一行、每一列、每个3*3的格子里只能出现一次1~9。 【思路】 参考了思路,附加了解释。 dfs遍历所有非空格子,n是已经填好的个数。 初始化条件。n=81,都填了,返回结束。对于已经填好的b[x][y] != '.'跳过,到下一个。 xy的设计保证先行后列填写。 开始填数字,valid 阅读全文
posted @ 2018-11-19 16:29 alau 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 【题目】 There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it 阅读全文
posted @ 2018-11-19 15:46 alau 阅读(239) 评论(0) 推荐(0) 编辑