Round 403 div. 2
B 可以二分相遇的坐标;也可以二分时间,判断是否存在两个人的区间没有交。
An easy way to intersect a number of segments [l1, r1], ..., [ln, rn] is to compute L = max li and R = min ri.
If L ≤ R, then [L, R] is the intersection, otherwise, the intersection is empty.
C dfs
D 乱搞+思维
每个队名字非A即B
1.首先把那些A重复的队找出来,它们都只能选B为名字
2.剩下的队A名字不重复,如果与已选的B重名,也只能选B,一直循环地做下去
3.直到终止,剩下没有考虑过的队都可以选A
4.最后再判一判是否有重复的队名(B中,不必考虑A) //当然也可以每次把一个队名字印点为B时判重,若曾出现过,return "NO";
若一开始A都互不相同,则全部A。
如果没有额外的条件,可能只能用2-SAT了
E 我是先弄出一棵生成树,dfs一下得到欧拉序列,保证点数=2n-1
Round 403 div. 2的更多相关文章
- Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals)
Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) 说一点东西: 昨天晚上$9:05$开始太不好了,我在学校学校$9:40$放 ...
- Codeforces Round #403 (Div. 1, based on Technocup 2017 Finals)
Div1单场我从来就没上过分,这场又剧毒,半天才打出B,C挂了好几次最后还FST了,回紫了. AC:AB Rank:340 Rating:2204-71->2133 Div2.B.The Mee ...
- Codeforces Round#403 (Div. 1)
唉,昨天晚上迷迷糊糊地去打cf,结果fst两题,掉回蓝了... A.Andryusha and Colored Balloons 题意:给定一棵树,任意两个距离小等于二的点不能染相同的颜色,求最小颜色 ...
- 树的性质和dfs的性质 Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) E
http://codeforces.com/contest/782/problem/E 题目大意: 有n个节点,m条边,k个人,k个人中每个人都可以从任意起点开始走(2*n)/k步,且这个步数是向上取 ...
- 2-sat Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) D
http://codeforces.com/contest/782/problem/D 题意: 每个队有两种队名,问有没有满足以下两个条件的命名方法: ①任意两个队的名字不相同. ②若某个队 A 选用 ...
- Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) E Underground Lab
地址:http://codeforces.com/contest/782/problem/E 题目: E. Underground Lab time limit per test 1 second m ...
- Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) D. Innokenty and a Football League
地址:http://codeforces.com/contest/782/problem/D 题目: D. Innokenty and a Football League time limit per ...
- Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) C Andryusha and Colored Balloons
地址:http://codeforces.com/contest/782/problem/C 题目: C. Andryusha and Colored Balloons time limit per ...
- Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) B. The Meeting Place Cannot Be Changed
地址:http://codeforces.com/contest/782/problem/B 题目: B. The Meeting Place Cannot Be Changed time limit ...
随机推荐
- MAVEN相关文章
Maven入门指南① :Maven 快速入门及简单使用 Maven入门指南② :Maven 常用命令,手动创建第一个 Maven 项目 Maven入门指南③:坐标和依赖 Maven入门指南④:仓库 M ...
- python Matplotlib数据可视化神器安装与基本应用
Matplotlib Matplotlib 是一个非常强大的 Python 画图工具; 手中有很多数据, Matplotlib能帮你画出美丽的: 线图; 散点图; 等高线图; 条形图; 柱状图; 3D ...
- MAC终端安装指定版本node
MAC终端安装指定版本node 安装brew 终端上运行 $ /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Home ...
- Kibana TypeError : Object #<GlobalState> has no method 'setDefaults'
在windows server中装完elasticsearch和kibana后,elasticsearch能正常访问(http://localhost:9200): 而访问kibana的地址(http ...
- python-redis集合模式
无序集合SADD set集合是直接去重的,只会输出 xiao hehe sadd names3 xiao xiao hehe hehe 获取集合 names3的所有值,集合不能用切片形式获取值, ...
- OA系统与Exchange 日历打通
目前我碰到好几个案例是希望将客户以后的OA系统与Exchange中的日历系统相结合,比如致远或者泛微的OA系统. 客户的需求如下: 1.有了OA系统 2.客户使用Outlook当邮件客户端 3.客户希 ...
- Linux内核学习笔记(3)-- 进程的创建和终结
一. 进程创建: Unix 下的进程创建很特别,与许多其他操作系统不同,它分两步操作来创建和执行进程: fork() 和 exec() .首先,fork() 通过拷贝当前进程创建一个子进程:然后,ex ...
- Arctic Network POJ 2349 (最小生成树思想)
Description The Department of National Defence (DND) wishes to connect several northern outposts by ...
- Java 学习笔记 ------第六章 继承与多态
本章学习目标: 了解继承的目的 了解继承与多态的关系 知道如何重新定义方法 认识java.lang.object 简介垃圾回收机制 一.继承 继承是java面向对象编程技术的一块基石,因为它允许创建分 ...
- 02慕课网《vue.js2.5入门》——Vue中的组件,实现todolist
TodoList功能开发 例子:输入字符,在列表中显示: 由于有v-for属性,<li>不会被渲染,它已经和数据绑定在一起,有数据来决定 input和button上都有事件监听器,inpu ...