![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
UVa练习
文章平均质量分 76
宇文氏
这个作者很懒,什么都没留下…
展开
-
UVa 941: Permutations 排列?其实是阶乘
原题链接:UVa 941-Permutations 使用中的next_permutation函数遍历所有情况,代码如下: #include #include #include #include using namespace std; char str[25]; int main() { int N, num, len; scanf("%d", &N); while(N--)原创 2014-02-11 22:03:17 · 1449 阅读 · 0 评论 -
UVa 10901: Ferry Loading III 装上车子过河去
原题链接:UVa 10901: Ferry Loading III 题目大意:使用渡船运输汽车,给定渡船的最大载车数n、渡河所需时间t(来去时间相同)。只要河两岸有车在等待运输,船就进入工作状态。超出载量的车就等下次船靠岸的时候再进行运输,船初始停靠在左岸。 大致思路: #include #include #include #include using namespace std;原创 2014-02-10 22:10:44 · 1323 阅读 · 2 评论