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. dns服务器测试工具

    下载地址:https://www.eatm.app/wp-content/uploads/2018/08/eDnsTest.20180810.zip

  2. VS 代码整理插件推荐:CodeMaid

    一直在用,觉得很不错,其他插件基本上不用了,所以拿来记录并分享一下.CodeMaid 说明文档CodeMaid 下载安装不用说明了,使用看说明文档就好. CodeMaid和ReSharp类似,开源且免 ...

  3. 阿里八八Alpha阶段Scrum(1/12)

    任务分配 叶文滔:整体框架UI设计.作为组长进行任务协调 俞鋆:后端服务器及数据库搭建 王国超:日程模块多日显示部分设计 黄梅玲:日程模块单日显示部分设计 林炜鸿:日程模块文本添加部分设计 张岳.刘晓 ...

  4. 类与对象 - Java学习(二)

    弄清楚类与对象的本质与基本特征,是进一步学习面向对象编程语言的基本要求.面向对象程序设计与面向过程程序设计在思维上存在着很大差别,改变一种思维方式并不是一件容易的事情. 一.面向对象程序设计 程序由对 ...

  5. python中for、while循环、if嵌套的使用

    1.for循环字符串就是一个有序的字符序列for i in range(5):     print(i)定义一个死循环while True:     pass2.break和continue肯定需要和 ...

  6. 洛谷P1803

    #include <iostream>#include <algorithm>#include <cstdio>using namespace std; struc ...

  7. 2018.4.26 Mac安装Redis5.0.3版本服务器

    Mac安装Redis服务器 安装 1.到官网下载 选择稳定版本 打开官网:https://redis.io/ 2.下载完成后,打开命令行工具,执行解压命令 tar zxvf redis-5.0.3.t ...

  8. OpenCV——图像的矩(计算矩、轮廓面积、轮廓或曲线长度)

    图像矩描述了图像的全局特征 一阶矩与形状有关 二阶距显示曲线围绕直线平均值的扩展程度 三阶矩是关于平均值的对称性测量 由二阶和三阶矩可以导出7个不变矩,不变矩是图像的统计特性,满足平移.伸缩.旋转的不 ...

  9. (二) DRF 视图

    DRF中的Request 在Django REST Framework中内置的Request类扩展了Django中的Request类,实现了很多方便的功能--如请求数据解析和认证等. 比如,区别于Dj ...

  10. P1312 Mayan游戏

    题目描述 Mayan puzzle是最近流行起来的一个游戏.游戏界面是一个 7 行5 列的棋盘,上面堆放着一些方块,方块不能悬空堆放,即方块必须放在最下面一行,或者放在其他方块之上.游戏通关是指在规定 ...