PAT 1006 Sign In and Sign Out 查找元素
Input Specification:
Output Specification:
Sample Input:
Sample Output:
#include<iostream>
#include<algorithm>
#include<string>
#include<cstdio>
using namespace std;
int main()
{
int k,h,m,s;
int i,in_time,out_time;
int maxs=,mins=0x7fffffff;
string str,unlock,lock;
cin>>k;
for(i=; i<k; i++)
{
cin>>str;
scanf("%d:%d:%d",&h,&m,&s);
in_time=h*+m*+s;
scanf("%d:%d:%d",&h,&m,&s);
out_time=h*+m*+s;
if(in_time<mins)
{
mins=in_time;
unlock=str;
}
if(out_time>maxs)
{
maxs=out_time;
lock=str;
}
}
cout<<unlock<<" "<<lock;
return ;
}
PAT 1006 Sign In and Sign Out 查找元素的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- PAT甲级——1006 Sign In and Sign Out
PATA1006 Sign In and Sign Out At the beginning of every day, the first person who signs in the compu ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- PAT/查找元素习题集
B1004. 成绩排名 (20) Description: 读入n名学生的姓名.学号.成绩,分别输出成绩最高和成绩最低学生的姓名和学号. Input: 每个测试输入包含1个测试用例,格式为: 第1行: ...
随机推荐
- 稳定易用的 Django 分页库,完善分页功能
作者:HelloGitHub-追梦人物 文中所涉及的示例代码,已同步更新到 HelloGitHub-Team 仓库 在 通过 Django Pagination 实现简单分页 中,我们实现了一个简单的 ...
- python基础实战之猜年龄游戏
目录 一.Python基础实战之猜年龄游戏 给定年龄,用户可以猜三次年龄 年龄猜对,让用户选择两次奖励 用户选择两次奖励后可以退出 age = 18 # 答案 count = 0 # 游戏次数控制 p ...
- java8-从Lamda到方法引用和构造引用
一方法引用概述 经过前面2章Lamda原理引入和Lamda解析,基本就会熟练使用Lamda表达式,这次我们更深入点.来了解一下方法引用. 方法引用是特定Lamda表达式的一种简写,其思路就是能替换La ...
- 使用ASP.NET Core 3.x 构建 RESTful API - 3.4 内容协商
现在,当谈论起 RESTful Web API 的时候,人们总会想到 JSON.但是实际上,JSON 和 RESTful API 没有半毛钱关系,只不过 JSON 恰好是RESTful API 结果的 ...
- [UIApplication sharedApplication].keyWindow和[[UIApplication sharedApplication].delegate window]区别
参考链接:https://www.cnblogs.com/henusyj-1314/p/11643189.html 结论1.在获取到window时最好使用[[UIApplication sharedA ...
- Scrcpy用电脑控制Android手机(支持Windows/macOS/Linux)
一.scrcpy简介 注意:拼写是scrcpy,非Python爬虫框架Scrapy. scrcpy可以通过adb调试的方式来将手机屏幕投到电脑上,并可以通过电脑控制您的Android设备.它可以通过U ...
- Navicat Keygen - 注册机是怎么工作的?
Navicat Keygen - 注册机是怎么工作的? 1. 关键词解释. Navicat激活公钥 这是一个2048位的RSA公钥,Navicat使用这个公钥来完成相关激活信息的加密和解密. 这个公钥 ...
- 微软与阿里云合作推出“开放应用模型(OAM)”
英文原文:Announcing the Open Application Model (OAM) 原文标题:微软与阿里云合作推出“开放应用模型(OAM)” 用于 Kubernetes 及更多平台的应用 ...
- 在IIS中部署.net core应用
在IIS中部署 .NET Core应用 对于熟悉IIS的程序员来说,将 .NET Core Web应用部署在IIS中,无疑是方便统一管理的事情.网上给出很多如何在IIS中部署 .NET Core 应用 ...
- unity3D开发环境搭建
前言 本文记录unity3D开发环境的搭建 unity安装 unity有中文官网(https://unity.cn/),很贴心,ide工具我们选择下载安装中国区增强版,下载地址:https://uni ...