博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
第一轮 L
阅读量:5046 次
发布时间:2019-06-12

本文共 2112 字,大约阅读时间需要 7 分钟。

Scientific ConferenceTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionFunctioning of a scientific conference is usually divided into several simultaneous sections. For example, there may be a section on parallel computing, a section on visualization, a section on data compression, and so on.Obviously, simultaneous work of several sections is necessary in order to reduce the time for scientific program of the conference and to have more time for the banquet, tea-drinking, and informal discussions. However, it is possible that interesting reports are given simultaneously at different sections.A participant has written out the time-table of all the reports which are interesting for him. He asks you to determine the maximal number of reports he will be able to attend.InputThe first line contains the number 1 ≤ N ≤ 100000 of interesting reports. Each of the next N lines contains two integers Ts and Te separated with a space (1 ≤ Ts < Te ≤ 30000). These numbers are the times a corresponding report starts and ends. Time is measured in minutes from the beginning of the conference.OutputYou should output the maximal number of reports which the participant can attend. The participant can attend no two reports simultaneously and any two reports he attends must be separated by at least one minute. For example, if a report ends at 15, the next report which can be attended must begin at 16 or later.Sample Inputinput	output53 41 56 74 51 3	3经典题目~,不说了/*************************************************************************	> File Name: l.cpp	> Author:yuan 	> Mail: 	> Created Time: 2014年11月09日 星期日 23时09分29秒 ************************************************************************/#include
#include
#include
#include
#include
#include
using namespace std;struct node{ int s,e;};node t[100007];int n;bool cmp(node t1,node t2){ return t1.e
=1) {ans++;k=t[i].e;} } printf("%d\n",ans); } return 0;}

转载于:https://www.cnblogs.com/codeyuan/p/4254396.html

你可能感兴趣的文章
软考-01.计算机系统的基础知识
查看>>
C# 复习、笔试全攻略(三、结构、枚举和数组)
查看>>
向量内积(点乘)和外积(叉乘)概念及几何意义
查看>>
昨天又是急急忙忙晚上把日志给投了
查看>>
斐波那契数列算法
查看>>
运行.py提示selenium.common.exceptions.WebDriverException
查看>>
WebService中的DataSet序列化使用
查看>>
BZOJ 1200 木梳
查看>>
【Linux】【C语言】菜鸟学习日志(一) 一步一步学习在Linxu下测试程序的运行时间...
查看>>
hostname
查看>>
SpringBoot使用其他的Servlet容器
查看>>
关于cookie存取中文乱码问题
查看>>
第二次OO总结
查看>>
练习 2:高斯分布,正态分布
查看>>
03、重定义CDF
查看>>
k8s架构
查看>>
select 向上弹起
查看>>
mysql 多表管理修改
查看>>
group by order by
查看>>
POJ 3090 坐标系上的视线遮蔽问题
查看>>