Codeforces 670C【排序+离散化】

在一场国际会议上,科学家们需要选择一部电影,使得尽可能多的科学家满意。电影有不同语言的音频和字幕,科学家们根据所知语言的匹配程度分为非常满意、几乎满意和不满意。输入包括科学家的语言知识和电影的音频、字幕语言,要求找到让最多科学家非常满意的电影,若有多解,则选择使几乎满意人数最多的电影。离散化技术用于将语言映射到有限集合,便于统计。通过排序和离散化,可以确定最佳电影选择。
摘要由CSDN通过智能技术生成

题目链接:http://codeforces.com/problemset/problem/670/C

Moscow is hosting a major international conference, which is attended by nscientists from different countries. Each of the scientists knows exactly one language. For convenience, we enumerate all languages of the world with integers from 1 to 109.

In the evening after the conference, all n scientists decided to go to the cinema. There are m movies in the cinema they came to. Each of the movies is characterized by two distinct numbers — the index of audio language and the index of subtitles language. The scientist, who came to the movie, will be very pleased if he knows the audio language of the movie, will be almost satisfied if he knows the language of subtitles and will be not satisfied if he does not know neither one nor the other (note that the audio language and the subtitles language for each movie are

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值