---
id: 553
title: "BZOJ2140:稳定婚姻题解"
slug: bzoj2140-stable-marriage
lang: zh
date: 2019-01-29T08:53:08
date_gmt: 2019-01-29T00:53:08
modified: 2019-01-29T08:53:08
status: publish
password_protected: false
category: { name: Olympiad in Informatics, slug: oi }
tags: [OI, 强连通分量, Tarjan]
original_url: https://kalorona.com/oi/bzoj2140稳定婚姻题解/
archived: 2026-11-27
editor: classic
media: []
archive_notes:
  - "Body heading was <h1> in the original; demoted to level 2 so the page title is the only h1."
comments: []
---

## 思路

婚姻关系建男到女的单向边，情人关系建女到男的单向边，求大小为一的强连通分量个数即可。
