Fork me on GitHub
摘要: 杨辉三角形求组合数问题 原题点这里 #include <iostream> #include <cmath> using namespace std; long long a[3100][3100]; int f[3100][3100]; int n,m,t,k; int main() { cin> 阅读全文
posted @ 2016-11-25 17:37 sxb门徒 阅读(167) 评论(0) 推荐(0) 编辑
摘要: M个位置可以打sif,N+1个人等着打sif,已知前N个人的时间,问第N+1个人什么时候才能打sif(不能插队,即必须按顺序来打sif) 输入N,M以及每个人所需要的时间;输出第N+1个人所需的时间 用优先队列用优先队列用优先队列 队列用来存每个水龙头所需要的总时间,到了最后用了最少时间的水龙头就是 阅读全文
posted @ 2016-11-25 15:40 sxb门徒 阅读(103) 评论(0) 推荐(0) 编辑
摘要: noip2016结束后的第一份代码……优先队列的练习 合并果子 原题在这里 #include <iostream> #include <queue> #include <vector> using namespace std; priority_queue <int> que; int main() 阅读全文
posted @ 2016-11-25 14:20 sxb门徒 阅读(78) 评论(0) 推荐(0) 编辑