[algorithm] My rookie plan to start
若干年后,经验有一些,但根基不牢靠。[algorithm] series 借助学习Standard Template Library: Algorithms的这段时期,在自己的算法和c++基础方面加些钢筋和混凝土,也为上层建筑提供有力的支持。
愿那些自称ITer但编程不过关的人……原地自爆yo。
证明的重要性:
Proofs are NOT academic embellishments - sometimes they are the only way to know that our algorithm will always work and that no disaster is waiting to happen!
打基础:http://coolshell.cn/articles/4990.html
课外阅读:http://blog.csdn.net/stephan14/article/details/48551769
Content
- 分赃问题
- 配对问题 (Stable Matching Problem) - Gale - Shapley algorithm
1. 分赃问题
(1) 背景

(2) 解析并扩展到n人分赃
?
(3) 代码实现
?
2. 配对问题
(1) 背景
配对的方式有多少种? Answer: n! ≈ (n/e)n - more than exponentially many in n。
那么,使用Gale - Shapley algorithm找到稳定的配对结果。
(2) 算法演示
[Math] Deferred Acceptance Algorithm
(3) 代码实现
13/38?
[algorithm] My rookie plan to start的更多相关文章
- POJ2175 Evacuation Plan
Evacuation Plan Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4617 Accepted: 1218 ...
- Timusoj 1982. Electrification Plan
http://acm.timus.ru/problem.aspx?space=1&num=1982 1982. Electrification Plan Time limit: 0.5 sec ...
- code forces 383 Arpa's loud Owf and Mehrdad's evil plan(有向图最小环)
Arpa's loud Owf and Mehrdad's evil plan time limit per test 1 second memory limit per test 256 megab ...
- UVALive 4987---Evacuation Plan(区间DP)
题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_ ...
- How to implement an algorithm from a scientific paper
Author: Emmanuel Goossaert 翻译 This article is a short guide to implementing an algorithm from a scie ...
- timus 1982 Electrification Plan(最小生成树)
Electrification Plan Time limit: 0.5 secondMemory limit: 64 MB Some country has n cities. The govern ...
- HDU 3757 Evacuation Plan DP
跟 UVa 1474 - Evacuation Plan 一个题,但是在杭电上能交过,在UVa上交不过……不知道哪里有问题…… 将施工队位置和避难所位置排序. dp[i][j] 代表前 i 个避难所收 ...
- Codeforces Gym 100002 E "Evacuation Plan" 费用流
"Evacuation Plan" Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/10 ...
- URAL 1994 The Emperor's plan 求组合数 大数用log+exp处理
URAL 1994 The Emperor's plan 求组合数 大数用log #include<functional> #include<algorithm> #inclu ...
随机推荐
- PHP——使用header()函数下载文件
思路:先指明内容的MIME类型,内容描述,内容长度(也即文件大小). 一.下载txt文件的程序: <?phpheader('Content-Type:text/plain');header('C ...
- Bootstrap CDN推荐
Bootstrap CDN推荐 本站实例采用的是百度的静态资源库(http://cdn.code.baidu.com/)上的Bootstrap资源. 百度的静态资源库的 CDN 服务,访问速度更快.加 ...
- C#基于Socket的简单聊天室实践
序:实现一个基于Socket的简易的聊天室,实现的思路如下: 程序的结构:多个客户端+一个服务端,客户端都是向服务端发送消息,然后服务端转发给所有的客户端,这样形成一个简单的聊天室功能. 实现的细节: ...
- 很少再用left join
作为开发,你是否经常碰到下面需要转换用户ID成用户名称的情况: 可惜你的这些业务表出于最少冗余设计要求,只有UserId,而没有UserName,这时你不得不破坏你一个类封装一个表的美好想法, 在你的 ...
- [Xamarin] 從Xamarin中呼叫 *.jar 的 library -建立.jar篇 (转帖)
嗯,這篇我們來聊聊如何從Xamarin 中來呼叫,已經包好的.jar ,首先因為要讓測試順利,我們開一個Android Java 的專案 當然是Eclipse ,然後我們簡簡單單寫一個測試用的libr ...
- 基于ABP的应用执行Update-Database出现异常的解决办法
今天在QQ群中看到有网友在更新数据库执行Update-Database时出现下面的错误: 为了能让搜索引擎搜索到,特意加上该错误的文字说明: 在与 SQL Server 建立连接时出现与网络相关的或特 ...
- java 多线程(ReadWriteLock)
package com.example; public class App { public static void main(String[] args) { Info info = new Inf ...
- 5天玩转C#并行和多线程编程 —— 第四天 Task进阶
5天玩转C#并行和多线程编程系列文章目录 5天玩转C#并行和多线程编程 —— 第一天 认识Parallel 5天玩转C#并行和多线程编程 —— 第二天 并行集合和PLinq 5天玩转C#并行和多线程编 ...
- 使用ACE遇到无法打开包括文件:“inttypes.h”的解决方案
本来想使用ACE_Get_Opt类来做一个命令行解析的功能,但是当项目中配置好了ACE库的路径后,编译时遇到"无法打开包括文件: inttypes.h : No such file or d ...
- Direct2D教程(外篇)环境配置
2014年世界杯首场淘汰赛马上开始了,闲着没事,整理以前的博客草稿打发时间,意外的发现这篇文章,本来是打算加入到Direct2D那个系列的,不知道为什么把它给遗漏了.环境配置,对于熟手来说,不是什么重 ...