
DFS
望舒丶
no regret voyage
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数独c++解决 dfs+减枝
刷华为的机试题(传送门:数独),刷到了一个关于数独的题目,以为数独还有什么特殊的解,自己写了个减枝的dfs过了83%的数据,但是好多同学都有同样的问题,估计使题目的问题把,这题有多解但是做法不同,就有不同的答案,但是答案都是正确的,然后test有只有一个这就很恼火,所以就假装我这是正确的吧。 以前听说过数独但是一直没有深入学习过,今天借着刷题学习了一下关于数独的知识,想不到什么高效的解法,就...原创 2020-02-21 21:49:46 · 401 阅读 · 0 评论 -
Codeforces dfs
D. Sleepy Gametime limit per test2 secondsmemory limit per test256 megabytesPetya and Vasya arranged a game. The game runs by the following rules. Players have a directed graph consisting of n verti...原创 2018-03-09 21:12:58 · 391 阅读 · 0 评论 -
codeforces 1005F dfs+bfs+思维
F. Berland and the Shortest Pathstime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn cities in Berland. Some pairs of cities are connecte...原创 2018-07-12 11:41:43 · 490 阅读 · 0 评论 -
codeforces1101D.GCD Counting 数论+DP+dfs
D. GCD Counting time limit per test 4.5 seconds memory limit per test 256 megabytes input standard input output standard output You are given a tree consisting of nn vertices. A number is wri...原创 2019-01-13 11:18:31 · 674 阅读 · 0 评论