![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dfs
nare123
这个作者很懒,什么都没留下…
展开
-
关于一组数据的排列与组合
采用dfs就可以实现:排列:#include#includeint vis[100];int p[100];int nn;void arr(int deep,int k){ for (int i=0;i<nn;i++) if (deep==k) { for (int j=0;j<k;j++)原创 2016-07-10 21:21:51 · 548 阅读 · 0 评论 -
Codeforces 690F1 - Tree of Life (easy)
F1. Tree of Life (easy)time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHeidi has finally found the mythical Tree of原创 2016-07-11 20:51:18 · 813 阅读 · 0 评论 -
Codeforces 682C. Alyona and the Tree
C. Alyona and the Treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlyona decided to go on a diet and went to the原创 2016-07-13 23:14:08 · 465 阅读 · 0 评论 -
Codeforces 687A NP-Hard Problem
A. NP-Hard Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently, Pari and Arya did some researc原创 2016-07-14 11:19:58 · 348 阅读 · 0 评论 -
Codeforces 472D. Design Tutorial: Inverse the Problem
D. Design Tutorial: Inverse the Problem time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output There is an easy way to obtain a new task from an原创 2016-08-16 08:39:15 · 555 阅读 · 0 评论 -
POJ 3009 Curling 2.0
Curling 2.0Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17729 Accepted: 7288DescriptionOn Planet MM-21, after their Olympic games this year, curling原创 2016-07-22 08:44:19 · 218 阅读 · 0 评论 -
Codeforces 711D Directed Roads
ZS the Coder and Chris the Baboon has explored Udayland for quite some time. They realize that it consists of n towns numbered from 1 to n.There are n directed roads in the Udayland. i-th of them goes原创 2016-09-06 22:25:18 · 325 阅读 · 0 评论