25/25,一遍过了,很开心。

#include<bits/stdc++.h>
using namespace std;
struct record{
string id;
string in_time;
string out_time;
};
vector<record> records;
void solve(){
int m;
cin>>m;
int t=0;
int unlockman=0;
int lockman=0;
string earliest_in,latest_out;
earliest_in="23:59:59";
latest_out="00:00:00";
while(m--){
record r;
cin>>r.id>>r.in_time>>r.out_time;
records.push_back(r);
if(r.in_time<earliest_in){unlockman=t;earliest_in=r.in_time;}
if(r.out_time>latest_out){lockman=t;latest_out=r.out_time;}
t++;
}
cout<<records[unlockman].id<<" "<<records[lockman].id;
}
int main(){
solve();
return 0;
}

这样的题多做其实也无益,所以为了节省时间,不妨只做通过率在0.35以下的题。挑战稍微有点难度的题。

A1006. Sign In and Sign Out(25)的更多相关文章

  1. 1006 Sign In and Sign Out (25 分)

    1006 Sign In and Sign Out (25 分) At the beginning of every day, the first person who signs in the co ...

  2. PAT 甲级 1006 Sign In and Sign Out (25)(25 分)

    1006 Sign In and Sign Out (25)(25 分) At the beginning of every day, the first person who signs in th ...

  3. PAT甲 1006. Sign In and Sign Out (25) 2016-09-09 22:55 43人阅读 评论(0) 收藏

    1006. Sign In and Sign Out (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue ...

  4. 1006 Sign In and Sign Out (25)(25 分)思路:普通的时间比较题。。。

    1006 Sign In and Sign Out (25)(25 分) At the beginning of every day, the first person who signs in th ...

  5. pat1006. Sign In and Sign Out (25)

    1006. Sign In and Sign Out (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue ...

  6. pat 1006 Sign In and Sign Out(25 分)

    1006 Sign In and Sign Out(25 分) At the beginning of every day, the first person who signs in the com ...

  7. PAT (Advanced Level) Practice 1006 Sign In and Sign Out (25 分) 凌宸1642

    PAT (Advanced Level) Practice 1006 Sign In and Sign Out (25 分) 凌宸1642 题目描述: At the beginning of ever ...

  8. PAT1006:Sign In and Sign Out

    1006. Sign In and Sign Out (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue ...

  9. PTA (Advanced Level) 1006 Sign In and Sign Out

    Sign In and Sign Out At the beginning of every day, the first person who signs in the computer room ...

  10. PAT Sign In and Sign Out[非常简单]

    1006 Sign In and Sign Out (25)(25 分) At the beginning of every day, the first person who signs in th ...

随机推荐

  1. Windows窗体数据抓取详解

    最近在客户项目上刚好遇到一个问题,项目需求是要获取某台机床的实时状态,问题点刚好就在于该机床不是传统意义上的数控机床,也不是PLC控制器,只有一个上传下载程序文件的应用程序,上面刚好有几个按钮可以大概 ...

  2. VMware虚拟机打开后不兼容

    在版本VMware Workstation10.0设置兼容性,在编辑——首选项——工作空间——设置EXS兼容.计算机工作区域打开虚拟机,右键管理.兼容性从新配置

  3. include_path='.;C:\php5\pear'解决方法

    问题原因:路径中出现中文, 解决方法:你懂的,,

  4. 极限编程核心价值:简单(Simplicity)

    写在前面 在编写 ASP.NET Core 项目时,深感项目设计的无力感,在软件设计方面我还有很长的路要走.我一直以来都把代码当作一种艺术的存在,认为自己是个"艺术家",其实就是个 ...

  5. C++构造析构函数生命期及对象生命期

  6. 请问下.net俱乐部这个组织现在还存在么?

    各位好,我是北京的一名.net开发人员,一直在想有什么线下技术活动可以开拓自己的视野,扩展人脉,我知道曾经有一个.net俱乐部很活跃 可是现在我在百度上搜了下.net俱乐部的信息,已经基本找不到201 ...

  7. 【转】ios tableView那些事(一)创建一个简单的tableView

    工作也有半年多了!几乎每个项目中的会用到tableview这个神奇而好用的控件,在学习和工作中都会看别人的博客!对我有很大的帮助,就如同站在巨人的肩膀上的感觉吧 哈哈!于是决定重新开始写博客,希望能帮 ...

  8. 20165302 程上杰 Exp1 PC平台逆向破解

    实验内容 手工修改可执行文件,改变程序执行流程,直接跳转到getShell函数. 利用foo函数的Bof漏洞,构造一个攻击输入字符串,覆盖返回地址,触发getShell函数. 注入一个自己制作的she ...

  9. zabbix没有frontends目录

    去解压缩的源码包中取 # cd /opt/data/src/about_zabbix/zabbix-2.2.3# cp -rv frontends/ /opt/OperMainManager/zabb ...

  10. 映众全新游戏内存条发布:单条16GB 最高4000MHz

    近日,显卡与内存厂商映众(INNO3D)推出了一款全新的游戏内存条产品——iCHILL Memory. iCHILL Memory是DDR4内存,单条容量有4GB-16GB可选,内存频率有2400MH ...