06 2014 档案

摘要:错排问题及其推广小结错排问题最早被尼古拉·伯努利和欧拉研究,因此历史上也称为伯努利-欧拉的装错信封的问题。问题1:把n个元素放入n个编号位置,其中第k号元素不能放在第k号位置的所有情况有多少种?n=1;f(1)=0; n=2;f(2)=1; n>=3;f(n)=(n-1)*(f(n-1)+f(n-2... 阅读全文
posted @ 2014-06-11 16:17 ruo_yu 阅读(609) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hunnu.edu.cn/online/?action=problem&type=show&id=11464&courseid=132题目:修路Time Limit:2000ms,Special Time Limit:5000ms,Memory Limit:32768... 阅读全文
posted @ 2014-06-09 14:41 ruo_yu 阅读(214) 评论(0) 推荐(0)
摘要:对各种排序算法的实现1.冒泡排序: 1 #include "stdio.h" 2 #define N 100005 3 4 void Swap(int *x,int *y){ int k=*x; *x=*y; *y=k; } 5 6 void Bubble_sort(int st,int en,... 阅读全文
posted @ 2014-06-05 17:59 ruo_yu 阅读(247) 评论(0) 推荐(0)
摘要:题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=35题目: 表达式求值 时间限制:3000 ms | 内存限制:65535 KB描述 ACM队的mdd想做一个计算器,... 阅读全文
posted @ 2014-06-03 14:26 ruo_yu 阅读(802) 评论(0) 推荐(0)