
欧拉路径
天翼之城*
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
单词接龙——欧拉路径
Description 相信大家都玩过单词接龙。小明的爸爸设计了一个单词接龙密码,连续两个单词,前一个的尾字母和后一个的首字母必须相同(“acm”后面可以接如“motorola”)。若能把所有的单词都连起来,那么就可以解开密码,拿到零花钱。 现在有N天,就有N个密码。现在请你帮忙给出,小明有多少天可以拿到零花钱。 Input 第一行一个整数T(1<=T<=10)表示天数。 每...原创 2018-08-24 09:05:46 · 570 阅读 · 0 评论 -
Gym 101879C Promenade by the lake —— dfs+并查集 找构成欧拉回路需要添加的边
The city of Porto will host the ICPC World Finals in 2019. One of the secret touristic spots in the city is the so-called “lake of the thousand bridges”. Mr. Manoel Pontes (Pontes stands for “bridges”...原创 2018-09-25 10:08:09 · 384 阅读 · 0 评论 -
Codeforces Contest 1152 E Neko and Flashback —— 欧拉路径
This way 题意: 给你一个长度为n的数组,名为a,现在分为两个长度为n-1的数组: 第一个数组b的第i位是min(ai,ai+1)min(a_i,a_{i+1})min(ai,ai+1) 第二个数组c的第i位是max(ai,ai+1)max(a_i,a_{i+1})max(ai,ai+1) 有一个p:1到n-1的某种排列,现在你知道b′,c′b',c&#x...原创 2019-07-08 16:57:12 · 220 阅读 · 0 评论