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. 第五次作业 hql查询

    hql查询是基于对象的查询,不是基于表的查询. 1.hql的简单查询 @Test public void queryUsers() { //简单查询 SessionFactory sf = null; ...

  2. JDK5 新特性之 可变参数的方法(2)---asList

    > Arrays.asList(T - a)方法的使用 >UnsupportedOperationException分析     Arrays.asList(T - a)方法的使用 pac ...

  3. MySQL基础之---mysqlimport工具和LOAD DATA命令导入文本文件

     1.mysqlimport工具的使用 看一下命令的使用方法: shell > mysqlimport -u root -p [--LOCAL] DBname File [option] --f ...

  4. mysql host'XXX' is not allowed to connect to this mysql server

    错误的原因一般是没有添加 IP可远程的权限. 首先以 root 帐户登陆 MySQL 1.在 Windows 主机中点击开始菜单,运行,输入“cmd”,进入控制台,然后cd 进入MySQL 的 bin ...

  5. XtraEditors七、ProgressBarControl、MarqueeProgressBarControl、ProgressPanel控件

    一.ProgressBarControl 进度条控件 效果如下: 示例代码: using System; using System.Collections.Generic; using System. ...

  6. HP-UX平台安装Oracle11gR2数据库

    1. 前提条件 1.1 认证操作系统 Certification Information for Oracle Database on Linux x86-64 (Doc ID 1304727.2) ...

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

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

  8. Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs

    在部署工程时,没有加入javax.servlet-api.jar(3.0.1) 和 standard.jar(1.1.2)两个jar包导致此问题. 另外,如果原来容器中有javax.servlet-a ...

  9. WorldWind源码剖析系列:四叉树瓦片类QuadTile

    四叉树瓦片类QuadTile提供了对影像和地形数据的四叉树访问模型.该类的类图如下. 四叉树瓦片类QuadTile提供的主要字段.属性和方法简要描述如下: public QuadTileSet Qua ...

  10. OpenCV (C++) 几何形状识别(面积过滤、横纵比过滤等等)

    #include <opencv2/opencv.hpp> #include <iostream> #include <math.h> using namespac ...